lib/pq — pull request #96 by jmcvetta (2013-04-08 19:14:29+00:00)
Title: Error:  "statement expects 0 inputs; got 1"

Found another error in transaction rollback handling, similar to #89. The error occurs when one begins a transaction, rolls back the transaction, then tries to create a prepared statement on the same `DB` object. Regardless of how many arguments a given statement requires, the call to `Prepare()` will fail with an error complaining statement expects zero inputs but got *n*, where *n* is the number of arguments provided.

# Test Case

This pull request includes a [test case](https://github.com/jmcvetta/pq/pull/new/prep_stmt_input_cnt#L0R503) that reliably reproduces the bug.

# Impact

This bug is blocking development of PostgreSQL dialect of the `qbs` ORM: coocood/qbs#11