2938 Commits

Author SHA1 Message Date
Jack Christensen
cf0de913ee Use pgtype.UUID for test instead of ext UUID 2021-11-29 12:29:02 -05:00
Jack Christensen
9fdaf7da81 Release v4.14.1 v4.14.1 2021-11-28 22:46:52 -05:00
Jack Christensen
5b91cac132 Update to pgtype v1.9.1 2021-11-28 22:43:59 -05:00
Jack Christensen
e95ebc02d9 Release v1.9.1 2021-11-28 16:29:42 -06:00
Jack Christensen
84bb47fb26 Fix: Timestamp DecodeBinary is in UTC
Preserve previously existing behavior.

fixes #138
2021-11-24 07:57:51 -06:00
Jille Timmermans
1d606a91b8 Change constant definition syntax so they show up in godoc
for TxAccessMode, TxDeferrableMode and TxIsoLevel

After this commit, Godoc understands these are the valid values of these
types and shows them together in the documentation.
2021-11-22 09:47:15 -06:00
Jack Christensen
058f346079 Start pgxpool background health check after initial connections
Otherwise the health check and the create initial connection(s) may both
create connections. While this generally wouldn't be a real problem it
did cause TestPoolBackgroundChecksMinConns to flicker on CI.
2021-11-20 11:19:10 -06:00
Jack Christensen
a55e88ee48 Do not run CI with verbose
Makes it very difficult to see what is actually failing.
2021-11-20 10:53:51 -06:00
Jack Christensen
9da0a7aef7 Release v4.14.0 v4.14.0 2021-11-20 10:48:31 -06:00
Jack Christensen
968a00094e Further increase wait times on timing tests for CI 2021-11-20 10:43:13 -06:00
Jack Christensen
885f39c368 Increase wait time in timing sensitive test 2021-11-20 10:28:52 -06:00
Jack Christensen
09c360f8aa Update supported / tested platforms 2021-11-20 10:25:10 -06:00
Jack Christensen
a9f8400b01 Upgrade pgx dependency
Fix test that was comparing times directly instead of using Equal.
2021-11-20 10:20:02 -06:00
Jack Christensen
e80bc75409 Release v1.9.0 2021-11-20 10:09:43 -06:00
Jack Christensen
662ecb496f Release v1.10.1 2021-11-20 09:56:46 -06:00
Jack Christensen
a457da8bff Unpin extendedQueryBuilder memory immediately after use
refs #1110
2021-11-13 17:12:09 -06:00
Jack Christensen
851091fdf4 Improve Query docs regarding error detection 2021-11-13 04:42:28 -06:00
Jack Christensen
146268e829 Move context test above bad statement cleanup 2021-11-13 04:12:35 -06:00
Georges Varouchas
cd7dcd5802 have lru.Get() always check if context is already expired 2021-11-13 04:10:45 -06:00
Georges Varouchas
141f132ae7 add a unit test on LRU context check
TestLRUContext highlights the lack of context check when querying for a cached value
2021-11-13 04:10:45 -06:00
Martin Ashby
40ecac487c Remove unimplemented JSON marshalling for FunctionCall type. 2021-11-06 16:39:43 -05:00
Martin Ashby
3d9a54f092 Fix unit test, it should return after any error is returned from Decode
function whether expected or not, rather than continue and try to
compare invalid decoded results.

Extend the unit test slightly to check the header.

Remove go-test/deep dependency in favour of standard library reflect
package.
2021-11-06 16:39:43 -05:00
Martin Ashby
9275da562f Added FunctionCall support
Added support for FunctionCall message as per
https://www.postgresql.org/docs/11/protocol-message-formats.html

Adds unit test for Encode / Decode cycle and invalid message format
errors.

Fixes https://github.com/jackc/pgproto3/issues/23
2021-11-06 16:39:43 -05:00
Jack Christensen
162dc65eff Make ContextWatcher concurrency safe
fixes #94
2021-11-06 08:57:49 -05:00
Jim Tsao
decb75f242 Add numeric tests for infinity encoding/decoding 2021-11-01 07:28:13 -05:00
Jim Tsao
14c515db82 Add infinity support for Numeric Binary Encode/Decode 2021-11-01 07:28:13 -05:00
Jim Tsao
8890a746d7 Add infinity support for Numeric Text Encode/Decode 2021-11-01 07:28:13 -05:00
Jim Tsao
001b3166b9 Add infinity support for Numeric AssignTo 2021-11-01 07:28:13 -05:00
Jim Tsao
e0f9fc5212 Add infinity support for Numeric Set/Get 2021-11-01 07:28:13 -05:00
Daniel
6cd6c43dcb Fix failing test 2021-11-01 07:26:49 -05:00
Daniel
8bc6aa6b49 Fix goroutine leak and unclosed connections 2021-10-30 10:25:09 -05:00
Daniel
36708a1cc6 Eager initialize minpoolsize on connect 2021-10-30 10:25:09 -05:00
Jack Christensen
a29019de9d Fix binary decoding of very large numerics.
fixes #133
2021-10-30 10:17:58 -05:00
Yuli Khodorkovskiy
5c447ff35d Fix JSON output for SASL{Response,InitialResponse}
Hex encoding the Data field in the SASL responses made debugging SCRAM
more difficult than actually helping.

Before:

F{"Type":"SASLResponse","Data":"633d655377732c723d4d4d4e4e6d666b536f5862694a68385833466d324f2b4d77787354692f4550753052414157484b7a306b7376336c5747392f4d4a5267504d2c703d616742664b533164383937674b4f4a6d4c7171626c49326b6b4a506f2b58354359516c63473458357657343d"}
F{"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"792c2c6e3d2c723d4d4d4e4e6d666b536f5862694a68385833466d324f2b4d77"}

After:

F{"Type":"SASLResponse","Data":"c=eSws,r=9dR43UQLL1KbrKKl4/QbxjqgVjZYR9mqnx3rFBiI7R/1pp5oeVYMGhXj,p=b2hmuvTvWn2xN0fclm+O4TwLAarRM8xoHSN7jsKDHAU="}
F{"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"y,,n=,r=9dR43UQLL1KbrKKl4/Qbxjqg"}
2021-10-30 09:08:58 -05:00
Jack Christensen
2caf113f1b Fix parsing text array with negative bounds
e.g. '[-4:-2]={1,2,3}'

fixes #132
2021-10-30 09:00:48 -05:00
urso
044ba47522 Add zerologadapter.NewContextLogger
This change introduces a new zerologadapter that allows
users to pass the actual logger via context.Context. Especially HTTP
middleware might choose to use `(*zerolog.Logger).WithContext` and
`zerolog.Ctx`. Allowing users to extract the logger from the context
keeps the full enriched logger available when pgx emits logs.
2021-10-30 08:52:59 -05:00
Adrian Sieger
b72f8084b5 implement nullable values for hstore maps 2021-10-30 08:38:48 -05:00
Jack Christensen
5cb98120c1 Add tests for big time and port fix to Timestamp.DecodeBinary
https://github.com/jackc/pgtype/pull/128
2021-10-23 09:57:10 -05:00
Lorenzo Paoliani
0d20d1241e Fixes a typo in the docs
I think this meant to say "until a notification is received" rather than "until a context is received".
2021-10-16 08:11:08 -05:00
Jim Tsao
e28459e9d1 Fix int64 overflow error 2021-10-08 14:46:26 +02:00
Jeff Widman
3599f64629 Tweak wording 2021-10-02 07:42:32 -05:00
Jeff Widman
ce81f577a9 Clarify that COPY is a specific command
COPY is a specific postgres command.
2021-10-02 07:41:49 -05:00
Rueian
290ee79d1e feat: remove unnecessary pending for CopyInResponse 2021-10-02 07:36:21 -05:00
Jan Dubsky
e53b7aebab Add support for fmt.Stringer and driver.Valuer in String fields encoding 2021-09-25 09:31:55 -05:00
Dan Gillis
b28c053c39 Add comments 2021-09-25 09:26:59 -05:00
Dan Gillis
bb8d7ffc87 Add comments
Add several comments and correct ConnectConfig
2021-09-25 09:26:59 -05:00
Dan Gillis
763050e10e Add comments
Add Stat struct comment and correct Stat.MaxConns method comment
2021-09-25 09:26:59 -05:00
Jack Christensen
0b5b7c0d1e Fix BPChar.AssignTo **rune
https://github.com/jackc/pgtype/issues/123
2021-09-25 09:25:01 -05:00
Thomas Frössman
255276c390 Add context options to zerologadapter
WithContextFunc adds possibility to get request scoped values from the
ctx.Context before logging lines.

WithoutPGXModule disables adding module:pgx to the default logger context.
2021-09-18 10:36:03 -05:00
Jack Christensen
b31b6d7a1a Upgrade github.com/jackc/puddle 2021-09-11 11:20:28 -05:00