PostgreSQL driver and toolkit for Go
 
 
 
Go to file
Jack Christensen a81a5f08b8 ConnectionPool now only creates the connections it needs 2013-07-26 07:27:14 -05:00
.gitignore Make connections configurable and skippable 2013-07-07 21:34:11 -05:00
README.md Make connections configurable and skippable 2013-07-07 21:34:11 -05:00
bench_test.go Add error to *ConnectionPool.Acquire return 2013-07-25 07:52:05 -05:00
connection.go Don't panic! 2013-07-20 13:07:30 -05:00
connection_pool.go ConnectionPool now only creates the connections it needs 2013-07-26 07:27:14 -05:00
connection_pool_test.go ConnectionPool now only creates the connections it needs 2013-07-26 07:27:14 -05:00
connection_settings_test.go.example Fix typo 2013-07-20 17:02:08 -05:00
connection_test.go Increase timeout in test to avoid flicker failure 2013-07-20 19:56:12 -05:00
data_row_reader.go Don't panic! 2013-07-20 13:07:30 -05:00
data_row_reader_test.go Don't panic! 2013-07-20 13:07:30 -05:00
example_value_transcoder_test.go Don't panic! 2013-07-20 13:07:30 -05:00
helper_test.go Don't panic! 2013-07-20 13:07:30 -05:00
message_reader.go MessageReader uses ReadCString and ReadString names 2013-07-20 08:40:37 -05:00
message_writer.go MessageWriter needs to be public for custom value transcoders 2013-07-15 17:57:43 -05:00
messages.go Add listen/notify 2013-07-19 17:01:38 -05:00
sanitize.go Add basic array transcoding for int16, int32, and int64 2013-07-20 19:51:01 -05:00
sanitize_test.go Add basic array transcoding for int16, int32, and int64 2013-07-20 19:51:01 -05:00
test_setup.sql Added connect with md5 password 2013-04-11 21:39:44 -05:00
value_transcoder.go Add basic array transcoding for int16, int32, and int64 2013-07-20 19:51:01 -05:00
value_transcoder_test.go Add basic array transcoding for int16, int32, and int64 2013-07-20 19:51:01 -05:00

README.md

pgx

Experimental PostgreSQL client library for Go

Usage

TODO

Development

Testing

Pgx supports multiple connection and authentication types. Setting up a test environment that can test all of them can be cumbersome. In particular, Windows cannot test Unix domain socket connections. Because of this pgx will skip tests for connection types that are not configured.

Normal Test Environment

To setup the normal test environment run the following SQL:

create user pgx_md5 password 'secret';
create database pgx_test;

Next open connection_settings_test.go.example and make a copy without the .example. If your PostgreSQL server is accepting connections on 127.0.0.1, then you are done.

Connection and Authentication Test Environment

Comple the normal test environment setup and also do the following.

Run the following SQL:

create user pgx_none;
create user pgx_pw password 'secret';

Add the following to your pg_hba.conf:

If you are developing on Unix with domain socket connections:

local  pgx_test  pgx_none  trust
local  pgx_test  pgx_pw    password
local  pgx_test  pgx_md5   md5

If you are developing on Windows with TCP connections:

host  pgx_test  pgx_none  127.0.0.1/32 trust
host  pgx_test  pgx_pw    127.0.0.1/32 password
host  pgx_test  pgx_md5   127.0.0.1/32 md5