2734 Commits

Author SHA1 Message Date
Lukas Vogel
f27e874d55 redact passwords in parse config errors
Redact passwords when printing the parseConfigError in a best effort manner.
This prevents people from leaking the password into logs, if they just print the error in logs.
2020-06-12 13:01:57 +02:00
Jack Christensen
09efc38390 Update changelog 2020-06-11 21:36:50 -05:00
Jack Christensen
a0bff84d73 Merge branch 'leighhopcroft-numeric-nan-support' 2020-06-11 21:35:49 -05:00
Jack Christensen
7bcd9fbdaf Rename IsNaN to NaN 2020-06-11 21:35:32 -05:00
Jack Christensen
ee66a98ace Merge branch 'numeric-nan-support' of git://github.com/leighhopcroft/pgtype into leighhopcroft-numeric-nan-support 2020-06-11 21:29:49 -05:00
Jack Christensen
a1b9eb4d4e Fix parseServiceSettings not returning error 2020-06-11 20:55:41 -05:00
Jack Christensen
6b254a445e Fix doc for ParseConfig 2020-06-11 20:51:40 -05:00
Jack Christensen
43696815c2
Merge pull request #39 from powersjcb/add-travis-config
Duplicate travis config from pgx
2020-06-11 19:45:24 -05:00
Jacob Powers
25d18b98e5 fix regression 2020-06-10 09:26:59 -07:00
Jacob Powers
de77c70f48 enable hstore extension before running tests 2020-06-10 09:05:14 -07:00
leighhopcroft
0b762c6e26 updated to use boolean IsNaN field on Numeric 2020-06-10 16:59:08 +01:00
Jacob Powers
97e4debcc0 disable test cases that require a binary sql snapshot 2020-06-10 08:27:56 -07:00
Jacob Powers
6d62aec6b1 remove irrelevant test from pgx 2020-06-09 18:31:49 -07:00
Jacob Powers
96f49eb89b copy travis configs over from pgx 2020-06-09 18:16:23 -07:00
Jacob Powers
3e586004db add travis config 2020-06-09 18:08:38 -07:00
Jack Christensen
e32805888d
Merge pull request #35 from georgysavva/scan-into-interface-dst
Make it possible to scan destination of *interface{} type.
2020-06-08 13:14:01 -05:00
georgysavva
a6d42976c6 Make it possible to scan destination of *interface{} type. 2020-06-08 13:18:54 +03:00
Jack Christensen
1f68908da6 Update changelog 2020-06-06 11:09:32 -05:00
Jack Christensen
59a28af6de Update dependencies 2020-06-06 11:00:22 -05:00
Jack Christensen
9b79c87d64 Update changelog 2020-06-06 10:59:27 -05:00
Jack Christensen
59a0074b0a Release v1.6.0 2020-06-06 10:52:55 -05:00
Jack Christensen
6cd2127b96 Update pgproto3 dependency 2020-06-06 10:52:07 -05:00
Jack Christensen
2758cbc0c4 Remove unnecessary allocation in rows.Values()
This was originally done to fix #386. But subsequent changes to pgtype
render the allocation unnecessary. Tests put in place with the original
fix still pass.
2020-06-06 10:39:33 -05:00
Jack Christensen
36944b232f Fix hstore with empty string values 2020-06-06 10:26:34 -05:00
Jack Christensen
937aec9841 Fix tests with newest pgx 2020-06-06 09:55:14 -05:00
Jack Christensen
4e50623069 Fix stdlib number size conversions 2020-06-06 09:54:19 -05:00
Jack Christensen
81140f6c27 Improve stdlib performance with large results 2020-06-06 09:49:14 -05:00
Jack Christensen
f6355165a9 Remove superfluous argument from ScanPlan 2020-06-06 09:10:11 -05:00
Jack Christensen
91a46ce219 Clarify and normalize Value semantics
Previously, Get implicitly allowed returning a reference to an internal
value (e.g. a []byte) but AssignTo was documented as requiring a deep
copy.

This inconsistency meant that either Get was unsafe or the deep copy in
AssignTo was superfluous. In addition, Scan into a []byte skips going
through Bytea and returns a []byte of the unparsed bytes directly. i.e.
a reference not a copy.

Standardize on allowing Get and AssignTo to return internal references
but require a Value never mutate internal values - only replace them.
2020-06-06 08:34:56 -05:00
Jack Christensen
73d0ac206c
Merge pull request #768 from georgysavva/fix-exposed-config
Fix exposed config
2020-06-06 07:05:13 -05:00
Jack Christensen
43e4070cb4 Better CompositeType and ArrayType Get implementation 2020-06-05 13:40:03 -05:00
leighhopcroft
f2a2797a88 support NaN in Numeric encode and decode methods 2020-06-02 20:14:51 +01:00
leighhopcroft
b708c8b985 support NaN in Numeric.AssignTo 2020-06-02 19:07:10 +01:00
leighhopcroft
3cbb81631a added NaN support to Numeric.Set 2020-06-02 18:35:58 +01:00
georgysavva
e29ce9f6d6 Add Config.Copy() in pgx and pgxpool packages. Conn.Config() and Pool.Config() return copy of the original config. 2020-06-02 13:35:05 +03:00
Jack Christensen
fa742c5248
Merge pull request #41 from georgysavva/add-config-copy
Add Config.Copy() method that returns a smart copy of the config.
2020-06-01 13:11:01 -05:00
georgysavva
a6d9265506 Implement deep copy manually, stop using an external deep copy library. Add comment to the Config.Copy() method. 2020-06-01 20:52:08 +03:00
georgysavva
608451a215 Store original config in Conn before updating it. 2020-06-01 19:38:12 +03:00
georgysavva
8d541d0004 Add Config.Copy() method that return a smart copy of the config. 2020-06-01 19:20:17 +03:00
Jack Christensen
0e04d8187e Add raw benchmark 2020-06-01 08:53:45 -05:00
Jack Christensen
4b95a747d7 Use pgtype.NewValue instead of reflect for Values()
This is both cleaner and necessary for pgtype.TypeValue types.
2020-05-30 13:32:15 -05:00
Jack Christensen
8dee3382f7 Improve unknown type support for database/sql
- Return unknown type OID instead of empty string for type name.
- ScanType is string instead of empty interface for unknown types.

fixes #759
2020-05-30 13:27:25 -05:00
Jack Christensen
837704dc7d Update stdlib docs to point to Conn.Raw instead of AcquireConn 2020-05-30 13:27:25 -05:00
Jack Christensen
2bd26ec7fa Expose stdlib.Conn.Conn() to enable database/sql.Conn.Raw() 2020-05-30 13:27:25 -05:00
Jack Christensen
e6c101413b
Merge pull request #761 from ikozinov/rows-close-logger
Added err field because log output is a bit confusing since it is not clear what error occurred
2020-05-27 08:48:22 -05:00
Igor V. Kozinov
4043edafe7 Add error field to logger on rows close 2020-05-27 14:44:53 +06:00
Jack Christensen
9e1a67c1bc Wait longer in timing sensitive test
Less likely to fail on CI.
2020-05-25 12:04:01 -05:00
Jack Christensen
2647eff567 Fix ValidateConnect with cancelable context
fixes #40
2020-05-25 11:49:37 -05:00
Jack Christensen
e318c27e26 Merge branch 'jordanlewis-send-batch-simple' 2020-05-25 11:37:52 -05:00
Jack Christensen
72bba7fb42 Move batch simple protocol test to batch_test.go 2020-05-25 11:36:18 -05:00