It partially implements version 3.0 of the PostgreSQL frontend/backend protocol, so it should work with servers of version 7.4 and later.
- Make sure you have a working Go installation, see the installation guide at http://golang.org/doc/install.html
- git clone http://github.com/lxn/go-pgsql.git
- cd go-pgsql/src/pkg/pgsql && gomake install
Alternatively you can use goinstall: goinstall github.com/lxn/go-pgsql/src/pkg/pgsql
There are some examples in the src/cmd/examples directory which should get you started.
Please open an issue on the bug tracker if you encounter a bug.
go-pgsql is currently missing support for some features, including:
- authentication types other than MD5
- SSL encrypted sessions
- some data types like bytea, ...
- canceling commands/queries
- bulk copy
go-pgsql is (at least for now) not thread-safe, so for every goroutine that must talk to the same database, a separate Conn is required.
Because the resolution of time.Time is seconds, fractions of seconds are
silently dropped by