Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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>
  • Loading branch information...
commit e91b0486fbdd9367065d0470c1eac598e4ff3be9 1 parent 6c7918f
Dan Farina authored

Showing 1 changed file with 20 additions and 2 deletions. Show diff stats Hide diff stats

  1. +20 2 README.md
22 README.md
Source Rendered
@@ -20,8 +20,13 @@
20 20
21 21 **Connection String Parameters**
22 22
23   -These are a subset of the libpq connection parameters.
24   -See http://www.postgresql.org/docs/9.0/static/libpq-connect.html
  23 +These are a subset of the libpq connection parameters. In addition, a
  24 +number of the [environment
  25 +variables](http://www.postgresql.org/docs/9.1/static/libpq-envars.html)
  26 +supported by libpq are also supported. Just like libpq, these have
  27 +lower precedence than explicitly provided connection parameters.
  28 +
  29 +See http://www.postgresql.org/docs/9.1/static/libpq-connect.html.
25 30
26 31 * `dbname` - The name of the database to connect to
27 32 * `user` - The user to sign in as
@@ -36,6 +41,17 @@ See http://www.postgresql.org/docs/9.0/static/libpq-connect.html
36 41
37 42 See http://golang.org/pkg/database/sql to learn how to use with `pq` through the `database/sql` package.
38 43
  44 +## Tests
  45 +
  46 +`go test` is used for testing. A running PostgreSQL server is
  47 +required, with the ability to log in. The default database to connect
  48 +to test with is "pqgotest," but it can be overridden using environment
  49 +variables.
  50 +
  51 +Example:
  52 +
  53 + PGHOST=/var/run/postgresql go test pq
  54 +
39 55 ## Features
40 56
41 57 * SSL
@@ -43,6 +59,8 @@ See http://golang.org/pkg/database/sql to learn how to use with `pq` through the
43 59 * Scan `time.Time` correctly (i.e. `timestamp[tz]`, `time[tz]`, `date`)
44 60 * Scan binary blobs correctly (i.e. `bytea`)
45 61 * pq.ParseURL for converting urls to connection strings for sql.Open.
  62 +* Many libpq compatible environment variables
  63 +* Unix socket support
46 64
47 65 ## Future / Things you can help with
48 66

0 comments on commit e91b048

Please sign in to comment.
Something went wrong with that request. Please try again.