2722 Commits

Author SHA1 Message Date
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
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
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
Dan Gillis
8876b3a4ff Add comments 2021-09-11 11:07:31 -05:00
Jack Christensen
435605a59c Fix pgxpool BatchResults for QueryFunc 2021-09-11 11:05:44 -05:00
Jack Christensen
693c7c7f7d Fix NULL being lost when scanning unknown OID into sql.Scanner
https://github.com/jackc/pgx/issues/1078
2021-09-11 10:59:26 -05:00
Jack Christensen
38cd1b40aa Add QueryFunc to BatchResults
https://github.com/jackc/pgx/issues/1048#issuecomment-915123822
2021-09-11 10:32:02 -05:00
Kei Kamikawa
3bee0c6398 removed lines to read conn 2021-08-28 08:52:37 -05:00
Jack Christensen
90af821478 Remove old Travis CI code 2021-08-26 21:09:46 -05:00
Jack Christensen
30d7638296 Fix zeronull.Float8 2021-08-26 15:42:47 -05:00
Jack Christensen
39aa071b15 Add zeronull float8 2021-08-26 13:21:02 -05:00
Rulin Tang
5320ad87c8 remove query row connection release 2021-08-23 11:39:45 -05:00
Rulin Tang
c9e271df29 add missing pgx pool release for QueryRow 2021-08-23 11:39:45 -05:00
Carl Dunham
94f8441f4e Fix #119: add support for bare IP address as input for Inet 2021-08-12 17:50:31 -05:00
Don2Quixote
23b4656fc5 Made error check conditions clearer 2021-08-09 08:41:07 -05:00
Eli Treuherz
db84905b7f Add NullDecimal to shopspring-numeric
The shopspring/decimal package provides a NullDecimal struct intended
for use with nullable SQL NUMERICs and numbers. It has Scanner and
Valuer implementations already, but adding it to this package allows
it to be used with the binary encoding as well.

The implementation is very straightforward, but the tests have been made
slightly more complicated. The previous version wasn't testing the
decimal.Decimal cases, and this change adds those as well as new
NullDecimal cases. I've added some logic to the test harness to catch
these as you need to use the Equals method to properly compare Decimals.
2021-08-07 08:23:02 -05:00
Jack Christensen
6bda09691d Fix hstore binary null decoding
Bug was advancing the read pointer by the length of the value even if it
was a NULL value. Since NULL is indicated by a -1 length it actually
decremented the read pointer.
2021-07-31 11:06:03 -05:00
Jack Christensen
8f33ed07cd Release v4.13.0 v4.13.0 2021-07-24 10:59:24 -05:00
Jack Christensen
24f1d26fde Upgrade pgconn and pgtype 2021-07-24 10:55:24 -05:00
Jack Christensen
53f5fed36c Release v1.10.0 2021-07-24 10:52:26 -05:00
Jack Christensen
e26c6b4e3d Release v1.8.1 2021-07-24 10:50:22 -05:00
Jack Christensen
377eed5d2f Cleaning go.sum 2021-07-24 10:48:07 -05:00
Jack Christensen
c16a4f7d6a Revert "Temporarily delete tests and pgxtype to break recursive dependency with pgx"
This reverts commit 32e20a603178b49fb189d1be971d0fb6960cabb2.
2021-07-24 10:40:30 -05:00
Jack Christensen
640aa07df1 Temporary step to clean up go.sum 2021-07-24 10:39:13 -05:00
Jack Christensen
d89c8390a5 Update dependencies and go mod tidy 2021-07-24 10:25:38 -05:00
Jack Christensen
32e20a6031 Temporarily delete tests and pgxtype to break recursive dependency with pgx 2021-07-24 10:16:00 -05:00