Pure Go Postgres driver for database/sql
Go Shell
Switch branches/tags
Nothing to show
Clone or download
leighmcculloch and mjibson Add more instructions for running tests (#750)
What
===
Add more instructions for running tests.

Why
===
For those starting out and not familiar with how to get a PostgresSQL
up and running for tests some examples would be helpful.
Latest commit 90697d6 May 23, 2018
Permalink
Failed to load latest commit information.
certs sslmode=require compliance when root cert provided Jun 17, 2016
example/listen Add golint, make it pass cleanly, fix some docs Oct 22, 2017
hstore Add golint, make it pass cleanly, fix some docs Oct 22, 2017
oid Add ColumnType support Sep 13, 2017
.gitignore Add Vim temporary and backup files to .gitignore. Apr 17, 2012
.travis.sh bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
.travis.yml bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
CONTRIBUTING.md Add CONTRIBUTING.md for contributing guidelines Oct 7, 2013
LICENSE.md Add more accurate copyright clause Jun 7, 2013
README.md Add more instructions for running tests (#750) May 23, 2018
TESTS.md Add more instructions for running tests (#750) May 23, 2018
array.go Fix some linting issues Aug 8, 2017
array_test.go Check code with megacheck Oct 10, 2017
bench_test.go bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
buf.go Document that readBuf.int16() is unsigned Jul 23, 2015
conn.go Don't panic in SSL code Mar 27, 2018
conn_go18.go Don't panic in SSL code Mar 27, 2018
conn_test.go bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
connector.go Add support for database/sql Connector and OpenDB (#749) May 23, 2018
connector_example_test.go Add support for database/sql Connector and OpenDB (#749) May 23, 2018
connector_test.go Add support for database/sql Connector and OpenDB (#749) May 23, 2018
copy.go Merge pull request #559 from mjibson/copy-bad-race Jan 17, 2017
copy_test.go bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
doc.go Fix link to listen example Nov 12, 2017
encode.go Add support for BC dates Sep 21, 2017
encode_test.go Fix failing builds (#719) Mar 19, 2018
error.go Don't panic in SSL code Mar 27, 2018
go18_test.go bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
issues_test.go Keep track of being in the middle of a copy or not. Nov 2, 2016
notify.go bump minimum go version to 1.8, add go 1.10 Mar 20, 2018
notify_test.go Fix some issues in tests Oct 10, 2017
rows.go Add ColumnType support Sep 13, 2017
rows_test.go Add ColumnType support Sep 13, 2017
ssl.go Don't panic in SSL code Mar 27, 2018
ssl_go1.7.go Accept TLS renegotiation requests initiated by the backend Oct 22, 2016
ssl_permissions.go ssl: only set "sslrootcert" once Mar 8, 2017
ssl_renegotiation.go Accept TLS renegotiation requests initiated by the backend Oct 22, 2016
ssl_test.go ssl: only set "sslrootcert" once Mar 8, 2017
ssl_windows.go ssl: only set "sslrootcert" once Mar 8, 2017
url.go Use `net.{Join,Split}HostPort` for proper ipv6 handling Feb 7, 2016
url_test.go Use `net.{Join,Split}HostPort` for proper ipv6 handling Feb 7, 2016
user_posix.go Support rumprun GOOS Apr 26, 2016
user_windows.go Fallback to USER env var if user.Current failed Jan 9, 2015
uuid.go Validate incoming binary UUID Dec 31, 2016
uuid_test.go Fix some linting issues Aug 8, 2017

README.md

pq - A pure Go postgres driver for Go's database/sql package

GoDoc Build Status

Install

go get github.com/lib/pq

Docs

For detailed documentation and basic usage examples, please see the package documentation at http://godoc.org/github.com/lib/pq.

Tests

go test is used for testing. See TESTS.md for more details.

Features

  • SSL
  • Handles bad connections for database/sql
  • Scan time.Time correctly (i.e. timestamp[tz], time[tz], date)
  • Scan binary blobs correctly (i.e. bytea)
  • Package for hstore support
  • COPY FROM support
  • pq.ParseURL for converting urls to connection strings for sql.Open.
  • Many libpq compatible environment variables
  • Unix socket support
  • Notifications: LISTEN/NOTIFY
  • pgpass support

Future / Things you can help with

  • Better COPY FROM / COPY TO (see discussion in #181)

Thank you (alphabetical)

Some of these contributors are from the original library bmizerany/pq.go whose code still exists in here.

  • Andy Balholm (andybalholm)
  • Ben Berkert (benburkert)
  • Benjamin Heatwole (bheatwole)
  • Bill Mill (llimllib)
  • Bjørn Madsen (aeons)
  • Blake Gentry (bgentry)
  • Brad Fitzpatrick (bradfitz)
  • Charlie Melbye (cmelbye)
  • Chris Bandy (cbandy)
  • Chris Gilling (cgilling)
  • Chris Walsh (cwds)
  • Dan Sosedoff (sosedoff)
  • Daniel Farina (fdr)
  • Eric Chlebek (echlebek)
  • Eric Garrido (minusnine)
  • Eric Urban (hydrogen18)
  • Everyone at The Go Team
  • Evan Shaw (edsrzf)
  • Ewan Chou (coocood)
  • Fazal Majid (fazalmajid)
  • Federico Romero (federomero)
  • Fumin (fumin)
  • Gary Burd (garyburd)
  • Heroku (heroku)
  • James Pozdena (jpoz)
  • Jason McVetta (jmcvetta)
  • Jeremy Jay (pbnjay)
  • Joakim Sernbrant (serbaut)
  • John Gallagher (jgallagher)
  • Jonathan Rudenberg (titanous)
  • Joël Stemmer (jstemmer)
  • Kamil Kisiel (kisielk)
  • Kelly Dunn (kellydunn)
  • Keith Rarick (kr)
  • Kir Shatrov (kirs)
  • Lann Martin (lann)
  • Maciek Sakrejda (uhoh-itsmaciek)
  • Marc Brinkmann (mbr)
  • Marko Tiikkaja (johto)
  • Matt Newberry (MattNewberry)
  • Matt Robenolt (mattrobenolt)
  • Martin Olsen (martinolsen)
  • Mike Lewis (mikelikespie)
  • Nicolas Patry (Narsil)
  • Oliver Tonnhofer (olt)
  • Patrick Hayes (phayes)
  • Paul Hammond (paulhammond)
  • Ryan Smith (ryandotsmith)
  • Samuel Stauffer (samuel)
  • Timothée Peignier (cyberdelia)
  • Travis Cline (tmc)
  • TruongSinh Tran-Nguyen (truongsinh)
  • Yaismel Miranda (ympons)
  • notedit (notedit)