Temp fix for time parsing with a single decimal digit
Make tests independent of table "temp"

Previously, the test case would just hang.  That's a very interesting
behavior if one neglects to check the error and abort, regardless...

Signed-off-by: Dan Farina <drfarina@acm.org>
fix #8 - handle bind error earlier
go fmt

Signed-off-by: Dan Farina <drfarina@acm.org>
Implement many libpq environment variables

Use these to make the tests less dependent fewer compiled-in defaults
that cannot be overridden.

By default, the database "pqgotest" is used for tests now.  Unlike
libpq, "localhost" is used by default instead of the socket directory,
because there is a large split between vanilla PostgreSQL (which
places things in /tmp) and the way most packaged PostgreSQL places the
unix socket (/var/run/postgresql).  Also unlike libpq, we do not have the
advantage of the default configuration on the system being burned into
the driver, so "localhost" seems like a reasonable compromise.

A way to overcome that might be to call out to pg_config or link
against libpq, but that is not very good from a dependency perspective
and defeats the point of implementing a driver.

To run tests, for example, one can now write:

$ PGHOST=/var/run/postgresql/ go test pq

Signed-off-by: Dan Farina <drfarina@acm.org>
Readme beefup

Including environment variable support and how to use those to make
testing easier.  Also, link to PostgreSQL 9.1 documents, just because.

Signed-off-by: Dan Farina <drfarina@acm.org>
Implement Execer interface for one-shot queries

This allows one-shot queries to use selectivity information that can
only be known while binding parameters to get a better plan.

Signed-off-by: Dan Farina <drfarina@acm.org>
Send the Termination message when closing a connection.

The Postgresql server expects the client to end the connection by
first sending a Termination message ('X') followed up by closing the
socket. The server logs a "unexpected EOF on client connection" warning
if the socket is closed without the preceding Termination message.
Close Rows in tests.

The sql.DB.Close() function only closes connections that are marked as
free. The sql.Rows.Close() function marks the Row's connection as free,
so it must be invoked to cleanly close the DB.
Recover from a panic closing the socket.
functional accrue for ParseURL
add Ben
Explicitly store nil when reading a null value in rows.Next().

Sometimes dest has leftover values in it from the previous row (when the
query returns multiple rows). So we need to clear them.
add Andy
test nil column value after valid
In the event of an SSL error, return ErrBadConn
Return booleans as bool, not []byte.
Add test for scanning boolean into interface{}
Properly handle net.OpError and handshake failure
go fmt