Commit Graph

140 Commits (0f77a2d028414a616da37d0a07813dfaf61e5d5f)

Author SHA1 Message Date
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
Jack Christensen 9067b2d991 Rename ConnectionPoolOptions to ConnPoolConfig 2014-05-17 13:44:55 -05:00
Jack Christensen 1ff653ae15 Rename ConnectionParameters to ConnConfig 2014-05-17 13:38:13 -05:00
Jack Christensen 02e4506ffb Update README.md for Go 1.2
Remove mention of Go's inability to have a maximum connection pool
size as that issue has been resolved in Go 1.2.
2013-12-10 08:28:01 -06:00
Jack Christensen f76489f7d7 Add basic logging to pgx
fixes #21
2013-11-05 15:09:50 -06:00
Jack Christensen 007be95992 Add TLS to README.md 2013-10-03 08:11:19 -05:00
Jack Christensen 91e841bddd More readme tweaks and proofreading 2013-07-30 18:06:26 -05:00
Jack Christensen ff9cab7471 Tweak example in readme 2013-07-30 18:00:17 -05:00
Jack Christensen c6bf85bd63 Add more docs and explanation 2013-07-30 17:53:59 -05:00
Jack Christensen 08020c5b53 Remove experimental 2013-07-30 07:29:28 -05:00
Jack Christensen e99a9b2306 Make connections configurable and skippable
It is a hassle to setup all potential connection and authentication
types. And it is impossible to test Unix domain sockets on Windows. Make
testing non-default connections optional.
2013-07-07 21:34:11 -05:00
Jack Christensen 6ab233c6f9 Remove ERB templating support 2013-06-29 12:09:41 -05:00
Jack Christensen ec460173eb Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
Jack Christensen 3fef18bf38 Added automatic .go.erb compilation
fixes #16
2013-05-02 09:23:26 -05:00
Jack Christensen 1a7cf8ccc4 Added connect with md5 password 2013-04-11 21:39:44 -05:00
Jack Christensen 669cca8b3a Added script for database setup 2013-04-11 19:38:30 -05:00
Jack Christensen 996aed65ee Added ability to connect to databases by name
Add documentation to readme on how to set up tests
2013-04-11 08:56:31 -05:00
Jack Christensen 9a68d024c5 Initial commit 2013-03-30 12:06:27 -07:00