Skip to content

saschpe/go-pgsql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About go-pgsql

go-pgsql is a PostgreSQL client library for the Go programming language.

It partially implements version 3.0 of the PostgreSQL frontend/backend protocol, so it should work with servers of version 7.4 and later.

Installing go-pgsql

  1. Make sure you have a working Go installation, see the installation guide at http://golang.org/doc/install.html
  2. git clone http://github.com/lxn/go-pgsql.git
  3. cd go-pgsql/src/pkg/pgsql && gomake install

Alternatively you can use goinstall: goinstall github.com/lxn/go-pgsql/src/pkg/pgsql

Using go-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.

Missing Features

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.

Time/Timestamp resolution

Because the resolution of time.Time is seconds, fractions of seconds are silently dropped by *ResultSet.Time and *ResultSet.TimeSeconds.

About

A PostgreSQL client library for the Go programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%