Joseph Glanville
2184ffb5e9
Add support for encoding to UUID from string types
2015-09-10 00:58:51 +10:00
Jonathan Rudenberg
272262536b
Add support for pointers to pointers
...
Using types like **string allows the inner pointer to be nil’ed out,
avoiding the need for NullX types.
Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
2015-09-08 11:52:58 -05:00
Jack Christensen
4ebb0508b6
Encode dates in binary format
...
- Also allow NullTime to handle dates
2015-09-08 11:51:28 -05:00
Jack Christensen
9d200733b9
Merge common JSON and JSONB
2015-09-04 11:04:51 -05:00
Joseph Glanville
0013733535
Add JSON/JSONB support
2015-09-04 18:15:46 +10:00
Jack Christensen
fd39261551
Use binary transcoding for inet/cidr
...
fixes #87
2015-09-03 11:39:32 -05:00
Jack Christensen
9af068add0
Add cidr support
2015-09-03 09:42:01 -05:00
Jack Christensen
d494f83cd1
Add inet support
2015-09-03 09:33:19 -05:00
Jack Christensen
a0c76b897c
Fix doc typos
2015-08-21 13:50:31 -05:00
Jack Christensen
c44cbb12ab
Add sslmode note for ParseDSN
2015-08-21 13:50:06 -05:00
Rick Snyder
6413491657
Add support for specifying sslmode in connection strings
...
Add tests for sslmode parameter when calling ParseURI. Fix existing tests to work since default sslmode is 'prefer'
Make sure we default to prefer if sslmode is not provided in ParseDSN
Fix existing tests for ParseDSN to expect TLS configuration for prefer since prefer is the default sslmode; also, add tests for ParseDSN when specifying sslmode parameter on connection string
2015-08-19 11:33:12 -04:00
Jack Christensen
07a11abc07
Add basic PGSSLMODE support to ParseEnvLibpq
2015-05-23 13:49:26 -05:00
Jack Christensen
51d6d1a3a6
Add ParseEnvLibpq with support for basic envvars
2015-05-23 12:46:36 -05:00
Jack Christensen
dd9d960ba3
Add fallback TLS ConnConfig option
...
This is in preparation for supporting libpq style SSL options.
2015-05-23 11:57:36 -05:00
Jack Christensen
0c0a426d18
Add named error for server refused TLS
2015-05-15 19:21:59 -05:00
Jack Christensen
5bb7f64dac
Add more error fields to PgError
2015-05-01 18:06:17 -05:00
Lewis Marshall
784d12cbbc
Support using a custom dialer
...
For example I may want to use a dialer which retries transient network
errors (e.g. DNS issues).
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2015-04-18 22:42:55 +01:00
deoxxa
7e2886c576
add ParseDSN function
2015-04-08 14:50:56 +10:00
Jack Christensen
fc484ab5fd
Allow NullTime to work with timestamp
2015-03-27 18:14:36 -04:00
Jack Christensen
28ef19702f
Detect too many parameters on Prepare
...
refs #65
2015-03-14 18:58:09 -05:00
Jonathan Rudenberg
0176e3ccc0
Implement large object support
...
This patch implements large object support as described in
http://www.postgresql.org/docs/current/static/largeobjects.html
2015-01-01 22:01:01 -05:00
Jack Christensen
d77e599ce6
Add timestamptz[] support
2014-12-23 18:17:39 -06:00
Karl Seguin
67292290cf
support for inserting []time.Time into timestamp[] columns
2014-12-21 13:35:39 +07:00
Karl Seguin
d1b42d1c8e
support inserting into bool[]
2014-12-21 13:01:24 +07:00
Jack Christensen
79818c2557
Merge pull request #49 from karlseguin/mem1
...
reduce unecessary memory allocation
2014-11-17 20:36:57 -06:00
Karl Seguin
a8f5ce12c5
Trying to reduce memory allocation. logQueryArgs is called even when
...
using the default discardLogger. This allocates quite a bit of memory.
Created a default dlogger instance and avoid logging code when that's our
logger. I couldn't think of a better implementation without touching the
Logger interface.
On 100 000 inserts, this brought the allocation down to 58MB from 122MB.
It should also result in some small performance gains.
2014-11-18 07:53:33 +07:00
Karl Seguin
04b54f03a5
Use LastIndex instead of Split for better performance getting the number of rows affected from CommandTag
2014-11-16 12:43:47 +07:00
Jack Christensen
5edd660971
WaitForNotification detects lost connections quicker
...
Ping server every 15 seconds while waiting if no traffic has occurred.
2014-10-03 14:58:04 -05:00
Jack Christensen
44f44c1baa
Merge pull request #39 from anaxagoras/emptyquery
...
support EmptyQueryResponse message type
2014-09-27 14:37:13 -05:00
Jack Christensen
9e30e7aa93
Remove duplicate line
2014-09-27 12:20:36 -05:00
Jack Christensen
3d7974ce30
Always use keep-alive on TCP conns
2014-09-27 12:13:10 -05:00
Andy Walker
f715715c86
add support for EmptyQueryResponse
2014-09-26 17:14:28 -04:00
Andy Walker
33fb73b8ab
name consistency
2014-09-24 18:53:07 -04:00
Andy Walker
b46ee0a951
Add keep-alive option by creating a dialer first, then setting KeepAlive option
2014-09-24 18:38:15 -04:00
Jack Christensen
98853ea98f
more docs
2014-09-19 17:35:00 -05:00
Andy Walker
2f1ec582d7
Instead of native map[string]string, use type pgx.Hstore instead
2014-09-19 15:27:15 -05:00
Andy Walker
821605a8dd
Adding hstore support. map[string]string will encode to hstores and throw errors on hstores with NULL values, and there is now a NullHstore type that is basically map[string]NullString and will both accept and decode NULL values properly
2014-09-19 15:27:15 -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
Brian Dunn and Jack Christensen
a68115fc03
Fix data race with Rows and ConnPool
...
In an effort to reduce memory allocations, Rows was stored on the
Conn. This caused a race condition where Rows are closed and this
returns the Conn to the Pool. The Pool could then give out the Conn
again. Rows would then be reanimated and the original Rows could reclose
it.
2014-09-16 16:29:45 -05:00
Jack Christensen
a5f082fa03
Extract more error information
2014-09-15 14:52:32 -05:00
Jack Christensen
b21a653085
Truncate logged strings and byte slices
2014-09-15 13:53:59 -05:00
Jack Christensen
f5156ac4eb
discardLogger should be private
2014-09-04 16:45:35 -05:00
Jack Christensen
ff905fe862
Finish compatible interface to inconshreveable/log15
2014-09-04 16:27:40 -05:00
Jack Christensen
98109c57bb
Use interface for logging instead of log15 directly
2014-09-04 16:00:53 -05:00
Jack Christensen
311c332fdc
More logging
2014-09-03 11:13:29 -05:00
Jack Christensen
0ddf94ef9d
Add pgx.Oid serialization
2014-08-08 10:57:33 -05:00
Jack Christensen
2a04433355
Fix misleading error message
2014-08-08 10:31:47 -05:00
Jack Christensen
fb55203324
Add support for varchar[]
2014-07-31 13:35:44 -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
3144b5363f
Support unknown PostgreSQL types as strings
2014-07-19 17:49:11 -05:00