Browse files

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 <>
  • Loading branch information...
1 parent 6c7918f commit e91b0486fbdd9367065d0470c1eac598e4ff3be9 Dan Farina committed Apr 6, 2012
Showing with 20 additions and 2 deletions.
  1. +20 −2
@@ -20,8 +20,13 @@
**Connection String Parameters**
-These are a subset of the libpq connection parameters.
+These are a subset of the libpq connection parameters. In addition, a
+number of the [environment
+supported by libpq are also supported. Just like libpq, these have
+lower precedence than explicitly provided connection parameters.
* `dbname` - The name of the database to connect to
* `user` - The user to sign in as
@@ -36,13 +41,26 @@ See
See to learn how to use with `pq` through the `database/sql` package.
+## Tests
+`go test` is used for testing. A running PostgreSQL server is
+required, with the ability to log in. The default database to connect
+to test with is "pqgotest," but it can be overridden using environment
+ PGHOST=/var/run/postgresql go test pq
## Features
* Handles bad connections for `database/sql`
* Scan `time.Time` correctly (i.e. `timestamp[tz]`, `time[tz]`, `date`)
* Scan binary blobs correctly (i.e. `bytea`)
* pq.ParseURL for converting urls to connection strings for sql.Open.
+* Many libpq compatible environment variables
+* Unix socket support
## Future / Things you can help with

0 comments on commit e91b048

Please sign in to comment.