Commit Graph

67 Commits (77a2da2b4660734d3280fa7a49f50a59d4f884dd)

Author SHA1 Message Date
Jack Christensen 858d00788a Use extracted packages with Go modules 2019-04-05 10:59:47 -05:00
Jack Christensen c672c0d595 Use environment variables for test configuration 2018-12-30 21:52:33 -06:00
Jack Christensen db7df79e10 Add domain support
fixes #407
2018-04-07 14:04:16 -05:00
Alexey Palazhchenko ef4e998ed2
Use Retina-friendly SVG badge 2017-12-07 18:54:46 +03:00
Jack Christensen 82cd87d502 Support nil pointers to value implementing driver.Valuer
fixes #339
2017-10-26 21:37:06 -04:00
Jack Christensen d51cb880e9 Add more required libs for testing 2017-09-25 10:26:55 -05:00
Manni Wood 668eec13fc Adds `go get github.com/pkg/errors` to README.md 2017-09-23 12:07:24 -04:00
Jack Christensen 511b90478f Add Travis CI badge 2017-07-28 15:11:09 -05:00
Jack Christensen e00b151dbc Add source code example 2017-07-28 15:09:56 -05:00
Jack Christensen a1241d4aa9 Fix typo 2017-07-24 18:10:36 -05:00
Jack Christensen 534ea4a9cb Update README for v3 release 2017-07-24 08:04:01 -05:00
Jack Christensen 2e5f5e0c9d More README tweaks 2017-07-21 16:35:54 -05:00
Jack Christensen dde965bc9d README updates 2017-07-21 14:19:45 -05:00
Jack Christensen 4d6fe2d5fa Doc updates 2017-07-15 08:41:26 -05:00
Jack Christensen e2dae9f4ac Fix typo 2017-07-15 08:31:27 -05:00
Jack Christensen 784489d998 Update README.md with v3 2017-06-05 08:54:34 -05:00
Steve Atkins d2d99eac65 Add godoc.org badge to README.md 2017-05-09 17:42:33 -05:00
Jack Christensen 6c26c3a4a3 Improve replication test reliability
It was failing intermittently when run concurrently.
2017-03-11 11:17:51 -06:00
Jack Christensen dd0ee5bc6f Remove reference to gopkg.in
It doesn't work with sub-packages and now that Go has vendoring in the standard
build system it is less necessary.

fixes #164
2017-03-02 20:27:06 -06:00
Jack Christensen f895e970b5 Merge branch 'master' into v3-experimental
* master:
  Tweak replication test setup
  Properly make it a func init()
  The naming really matters
  Fix the syntax
  Properly make the replication tests skippable on 9.5 and below
  I forgot the tests are 9.6+
  One more try for travis
  Valid YAML helps.
  Dont break old postgres
  Try to fix travis
  Add the ability to set all the fields in the constructor
  Start replication now wraps the sql and returns errors properly
  It should all be unsigned.
  Capitalization
  Add replication stop mechanism
  Add basic logical replication protocol support
2017-01-06 15:25:57 -06:00
Jack Christensen 0ee01e0c4a Tweak replication test setup 2017-01-06 15:04:03 -06:00
Kris Wehner 8f5875b7b2 Try to fix travis 2017-01-05 09:50:23 -08:00
Jack Christensen 93e5c68f69 Merge branch 'master' into v3-experimental 2016-12-10 12:21:08 -06:00
Kris Wehner 7bbb1c7307 Add basic logical replication protocol support 2016-12-04 21:35:22 -08:00
Jack Christensen f8930d614f tricky user does not need superuser 2016-11-23 12:00:48 -06:00
Manni Wood df033d499f Adds a tricky user to test
This allows us to test aclitem encoding
with tricky SQL identifiers. The user actually
has to exist, or the aclitem will be incorrect.
2016-10-27 21:57:46 -04:00
Jack Christensen 32862d9bf8 Update versioning policy 2016-08-26 07:38:12 -05:00
Manni Wood 9ce81d7ab7 Updates test instructions in README
Lets the user know about extra packages
that need to be installed for the tests to run,
and that connection_settings_test.go.example
has been renamed to conn_config_test.go.example.
2016-08-21 14:22:32 -04:00
Jack Christensen 5f7d01778e Add CopyTo to support PostgreSQL copy protocol
fixes #102
2016-08-10 16:27:44 -05:00
Jack Christensen 2bf3fac594 Add note to README noting the experimental status of v3 2016-08-02 13:22:09 -05:00
Michael77 0a7d8f738e Update README.md 2016-08-01 08:40:50 -07:00
Jack Christensen d62da82ab1 Support decoding inet/cidr to net.IP
fixes #137
2016-04-22 16:00:11 -05:00
Alexey Palazhchenko 084a0d6778 Fix typo in README 2016-03-06 18:57:42 +03:00
Jack Christensen 9f9a9779ac Add compatibility with database/sql custom types
Support database/sql.Scanner
Support database/sql/driver.Valuer
2015-12-31 14:46:43 -06:00
Jack Christensen e4f401f6ec Add documentation for pointer to pointer null mapping 2015-09-08 12:15:16 -05:00
Jack Christensen 5ea6b04624 Add docs and example for JSON 2015-09-04 14:00:21 -05:00
Jack Christensen fee3679cb9 Note inet and cidr support in README.md 2015-09-03 13:48:18 -05:00
Jack Christensen 472929b247 Update README with more advantages of pgx
refs #73
2015-04-02 19:53:40 -05:00
Jonathan Rudenberg 10655944aa Minor docs fixes for large objects 2015-01-02 17:05:51 -05:00
Jack Christensen 0a213e6474 Add hstore to docs 2014-09-19 17:38:35 -05:00
Jack Christensen 98853ea98f more docs 2014-09-19 17:35:00 -05:00
Jack Christensen 890357732b Add tests for Hstore 2014-09-19 16:30:43 -05:00
Jack Christensen 8f81acfb5f Enhance support for custom types
* Add per connection oid to name map
* Global default type format is now based on names not oids
* Add better docs for custom types
2014-09-19 15:27:15 -05:00
Jack Christensen c24c28b218 Update README.md for logging 2014-09-04 16:34:25 -05:00
Jack Christensen e29574d447 Add support for integer, float and text arrays
Restructure internals a bit so pgx/stdlib can turn off binary encoding and
receive text back for array types.
2014-07-26 15:03:52 -05:00
Jack Christensen 61bf7d841a Always use bound parameters
PostgreSQL has two string syntaxes, one that allows backslash escapes and one
that does not (SQL standard conforming strings). By default PostgreSQL uses
standard conforming strings. QuoteString was only designed for use with
standard conforming strings. If PostgreSQL was configured with certain
combinations of the standard_conforming_strings and backslash_quote settings,
QuoteString may not correctly sanitize strings. QuoteString was only used in
unprepared queries, bound parameters are used for prepared queries.

This commit alters pgx to use always use bound parameters.

As a consequence of never doing string interpolation there is no need to have
separate Text and Binary encoders. There is now only the Encoder interface.

This change had a negative effect on the performance of simple unprepared
queries, but prepared statements should already be used for performance.

fixes #26

https://github.com/jackc/pgx/issues/26
2014-07-18 16:51:11 -05:00
Jack Christensen 5dace165f5 Add example custom type 2014-07-12 21:40:48 -05:00
Jack Christensen aff5043df9 Added a lot of documentation 2014-07-12 21:17:38 -05:00
Jack Christensen 5b345e80e1 Remove SelectValueTo
Benchmarks revealed that it is no longer performant enough to pull
its own wait. Using go_db_bench to copy JSON results to HTTP responses
it was ~20% *slower* for ~4BK responses and less than 10% faster for
+1MB responses.

The the performance problem was in io.CopyN / io.Copy. io.Copy
allocates a 32KB buffer if it doesn't have io.WriterTo or io.ReaderFrom
available. This extra alloc on every request was more expensive than
just reading the result into a string and writing it out to the response
body.

Tests indicated that if MsgReader implemented a custom Copy that used a
shared buffer it might have a few percent performance advantage. But the
additional complexity is not worth the performance gain.
2014-07-05 09:32:47 -05:00
Jack Christensen b6ac3ef2b0 Rename Execute to Exec 2014-06-27 14:56:27 -05:00