Avoid unnecessarily ignoring asynchronous messages

Commit 7454a9817b0f148ab5b1 looks to have fixed all callers of recv1
except this one.
Improve robustness of Begin, Rollback and Commit

Commits 46e935d341c15691dfb2614375 and 44ea1b5c0bf9099acec9e6c5f1
made the transactions handling functionality more robust, but we
can do a bit better than that by also checking the ReadyForQuery
state after these commands.

They also made it possible for the functions to panic, which is not
a good idea (see #178).  Guard against that with errRecover.
Check the number of supplied parameters against what the statement expects

Panicking here is not a good idea, and an explicit error message should
be a lot more helpful to the user as well.
Fix handling of CommandComplete response to SimpleQuery

The previous coding in simpleQuery was slightly misguided; it was
written under the assumption that CommandComplete would only be
sent after ErrorResponse, which, as pointed out in #186, is simply
not true.  CommandComplete should only be received there as a
response to a query which was successfully executed, but did not
return any results.  This also means that we return a nil error
*and* a nil rows to database/sql, which would either panic (if the
user calls Rows.Close), or leak the connection (if he doesn't).

While any program using Query to execute such queries will likely
be experiencing problems already, there's no reason to completely
break them.  To fix the problem, we return a rows object which has
its "done" flag already set to allow the user to close the Rows
object from database/sql to avoid leaking connections.  Also add a
test case to check that we consistently allow both types of queries
through both Query and Exec, both with and without parameters.
Support the "escape" bytea format when receiving data

This allows pq to operate correctly in both output formats, which
should help users who are still on PG 9.0 or have resorted to
setting bytea_output to "escape" for other reasons.

Even after this commit, bytea data is always sent in the "hex"
format.  This is not a problem for PostgreSQL versions 9.0 and later
as they are guaranteed to accept either format.  Older versions will
continue to experience problems, but it's not clear whether that
problem is worth fixing or not.
Merge pull request #195 from johto/bytea_escape

Support bytea_output=escape when receiving data
Add test for issue #196
Improved precision encoding support for float32 and float64

This ensures that all IEEE754 single and double precision floating
point values retain their full fidelity when submitted as parameters.
Add Matt Newberry to Contributors
Use a transaction in TestByteaOutputFormats

This avoids relying on getting the same connection for consecutive
queries from database/sql.
Add Go 1.2 to .travis.yml
Add extra_float_digits issue test
Set extra_float_digits to preserve float fidelity.

Without this setting, it's easy to lose fidelity when round-tripping data.
Automate OID table generation

Also document type Oid separately, and update
OID table to the Postgres 9.3 version.
Specify sizes for the floats in TestIssue196

float32 wasn't being tested at all.
Bump down extra_float_digits to 2

This is to avoid breaking 8.4 in preparation for fully supporting it
in an upcoming patch (see #199).

Note that the tests here do not correctly check for a required
extra_float_digits=3, since they still pass; this should be
reviewed further.
add support for bulk imports with COPY FROM STDIN

- db.Prepare("COPY foo (a, b) FROM STDIN") returns a COPY IN statement
- stmt.Exec(a, b) inserts new items
- stmt.Exec() syncs the input stream, since sql.Stmt.Close() does not
  return errors from stmt.Close()
optimize escapeText for strings without \r, \n, \t or \
update copyin.Exec documentation
adapt copyin to lib/pq changes