1956 Commits

Author SHA1 Message Date
Jack Christensen
e8857f04a1 Make BatchResults.Close safe to be called multiple times
https://github.com/jackc/pgx/issues/1138
https://github.com/jackc/pgx/issues/938
2022-02-07 10:44:39 -06:00
Jack Christensen
d02b2ed013 Add batch test for QueryRow without any rows
refs #1150
2022-02-05 20:12:35 -06:00
djsavvy
9eccdd6a81 Clarify that Values() and Scan() require Next() to have been called on the rows object 2022-02-05 20:06:01 -06:00
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
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
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
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
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
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
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
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
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
38cd1b40aa Add QueryFunc to BatchResults
https://github.com/jackc/pgx/issues/1048#issuecomment-915123822
2021-09-11 10:32: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
Don2Quixote
23b4656fc5 Made error check conditions clearer 2021-08-09 08:41:07 -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
640aa07df1 Temporary step to clean up go.sum 2021-07-24 10:39:13 -05:00
Michael Darr
59fa1868a7 Support time durations for simple protocol
Signed-off-by: Michael Darr <michael.e.darr@gmail.com>
2021-07-17 09:01:57 -05:00
KeiichiHirobe
1470d69c58 go mod tidy 2021-07-17 08:39:31 -05:00
KeiichiHirobe
48f39340b3 switch from github.com/go-kit/kit/log to github.com/go-kit/log 2021-07-17 08:39:31 -05:00
Jack Christensen
9ee04e87e3 Release v4.12.0 v4.12.0 2021-07-10 10:06:00 -05:00
Jack Christensen
785f279272 Upgrade dependencies 2021-07-10 10:02:16 -05:00
Nicholas Wilson
aafa04c156 Use zap.Any for handling interface{} -> zap.Field conversion
zap.Any falls back to zap.Reflect, but is better for this case, because
it first checks for the types that zap handles specially.  For example,
time.Duration, or error, which zap.Reflect will just treat as untyped
int64 or struct objects, but zap.Any is able to detect these types and
print them properly.
2021-07-06 20:18:16 -05:00
Aliaksandr Mianzhynski
4a2209a1b4 Don't allocate buffer when tx opts are empty 2021-06-26 10:52:09 -05:00
Dmytro Haranzha
cabb58cc40 ResetSession hook is called before a connection is reused from pool for another query. 2021-06-12 13:48:31 -05:00
dkinder
00feeaa5c9 stdlib: style nit in RandomizeHostOrderFunc 2021-05-10 08:17:53 -05:00
dkinder
a8020a21e8 stdlib: add OptionBeforeConnect and randomizer
Fixes https://github.com/jackc/pgconn/issues/71
2021-05-10 08:17:53 -05:00
alex
e722ca608c added url connection example 2021-04-17 09:56:17 -05:00
Andrew Kimball
3ab8941921 stdlib: Do not reuse ConnConfig strings
Previously, stdlib.RegisterConnConfig would sometimes reuse the same connection
string for different ConnConfig options (specifically, it happened when a connection
was open and then closed, and then a new, different connection was opened). This
behavior interferes with callers that expect that two connections with the same data
source name are connecting to the same backend database in the same way.

This fix updates stdlib.RegisterConnConfig to use an incrementing sequence
counter to uniquify all returned connection strings.

Fixes #947
2021-04-03 10:52:37 -05:00
Jonathan Amsterdam
88ede6efb5 stdlib: implement Conn.ResetSession
This prevents closed connections from being returned
by `database.sql.DB.Conn`.

Fixes #974.
2021-03-26 10:25:07 -05:00