Jack Christensen
0f7bf19387
Add *Conn.SetLogLevel
...
Allow changing log level after connection is established. Because
log level and loggers can be set independently, it is now possible
to have a log level above none when there is a nil logger. This
means all log statements need to check for nil logger and an
appropriate log level. This check has been factored out into
*Conn.shouldLog.
2016-02-13 10:13:10 -06:00
Jack Christensen
cffae7ff5d
Add SetLogger to *Conn
...
Allow replacing logger after connection is established. Also
refactor internals of logging such that there is a log method that
adds the pid to all log calls instead of making a new logger object.
The reason for this is so pid will be logged regardless of whether
loggers are replaced and restored.
2016-02-12 17:49:04 -06: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
f004f0802c
Add ConnPool.Reset method
...
refs #110
2015-12-12 13:15:14 -06:00
Jack Christensen
dd26ad0091
Remove unreachable code
2015-11-14 14:14:52 -06:00
Jack Christensen
e1215d9b19
[]byte skips encoding/decoding
...
refs #104
2015-11-12 14:54:25 -06:00
Jack Christensen
60cca3de7d
Disable SSL renegotiation
...
fixes #103
2015-10-26 12:07:54 -05:00
Jack Christensen
8d9eb62609
Add docs for relating to ConnConfig.RuntimeParams
2015-10-16 16:16:39 -05:00
Jack Christensen
ec8f6259e6
ParseEnvLibpq extracts PGAPPNAME
2015-10-16 16:13:15 -05:00
Jack Christensen
829d61ce40
ParseDSN extracts RuntimeParams
2015-10-16 15:48:24 -05:00
Jack Christensen
5b0550c1cb
ParseURI extracts run-time parameters
...
refs #99
2015-10-16 15:37:49 -05:00
Jack Christensen
1fb63a4b41
Add RuntimeParams to ConnConfig
2015-10-16 15:37:32 -05:00
Jack Christensen
41b96b5f77
Fix stdlib error caused by idempotent Prepare
2015-10-16 14:58:03 -05:00
Jack Christensen
984eace2b5
Make *Conn.Prepare idempotent.
...
fixes #94
2015-10-16 14:17:07 -05:00
Jack Christensen and Jake Worth
c726a51450
Add inet[] and cidr[] support
2015-09-29 13:23:26 -05:00
Jack Christensen
4987d5425e
Fix JSON encoding of *string
2015-09-21 13:40:47 -05:00
Jack Christensen
ca16a4c98f
Unlisten tweaks
...
- Use unlisten * when releasing connection with listeners to pool
- Only unlisten on releasing connection to pool when necessary
- Remove Unlisten("") as was to release all listeners
2015-09-21 08:18:10 -05:00
Joseph Glanville
eb5cadccf9
Track Listen/Unlisten and clear subscriptions on conn release
2015-09-21 07:56:45 -05:00
Jack Christensen
86837e5576
Add guards against usage of busy connection
2015-09-16 10:22:16 -05:00
Jack Christensen
23c48c2f87
Add trace logging
2015-09-16 08:40:01 -05:00
Jack Christensen
a1aa06c934
More efficient logging with log levels
2015-09-16 08:20:51 -05:00
Jack Christensen
a2e078597b
Add logging to rxMsg
...
Also benchmark what a log call costs
2015-09-14 10:25:48 -05:00
Jack Christensen
6e5fa60c4c
Fix cases where net conn write failure was not marking connection as dead
...
Also added loop to run these timing sensitive tests multiple times.
2015-09-12 19:32:55 -05:00
Jack Christensen
4ff46becfc
Generalize pointer to string uuid transcoding to any non-varchar/text type
2015-09-09 18:07:05 -05:00
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