Please sign in to comment.
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 <email@example.com>
- Loading branch information...