Jack Christensen
1a314bda3b
pgconn.Timeout() no longer considers `context.Canceled` as a timeout error.
...
https://github.com/jackc/pgconn/issues/81
2022-09-17 10:18:06 -05:00
Jack Christensen
4f1a8084f1
Various doc and changelog tweaks
2022-09-17 09:03:48 -05:00
Jack Christensen
a05fb80b8a
Update docs and changelog for renamed pgxpool.NewWithConfig
...
fixes https://github.com/jackc/pgx/issues/1306
2022-09-16 18:16:36 -05:00
Jack Christensen
90b69c0ee0
Fix atomic alignment on 32-bit platforms
...
refs #1288
2022-09-08 20:43:53 -05:00
Jack Christensen
ee2622a8e6
RowToStructByPos supports embedded structs
...
https://github.com/jackc/pgx/issues/1273#issuecomment-1236966785
2022-09-06 18:32:10 -05:00
Jack Christensen
d42b399be3
Update changelog
2022-09-03 13:42:36 -05:00
Jack Christensen
f015ced1bf
Use puddle v2.0.0-beta.2 for Acquire in background after cancel
2022-09-03 13:20:19 -05:00
Jack Christensen
782133158f
Test sending CopyData before CopyFrom responds with error
2022-09-03 09:31:41 -05:00
Tom Möller
dfce986bb5
Fix panic when logging batch error
2022-09-03 09:02:23 -05:00
Jack Christensen
f8d088cfb6
Fix JSON scan not completely overwriting destination
...
See https://github.com/jackc/pgtype/pull/185 for original report in
pgx v4 / pgtype.
2022-09-02 18:37:02 -05:00
Jack Christensen
f5cdf0d383
Update changelog
2022-08-27 18:18:41 -05:00
Jack Christensen
72fe594942
Upgrade to puddle v1.3.0
2022-08-27 18:18:34 -05:00
Jack Christensen
bce26b85d1
Fix atomic alignment on 32-bit platforms
...
refs #1288
2022-08-27 09:23:17 -05:00
Jack Christensen
bb6c997102
Add NewCommandTag
...
Useful for mocking and testing.
https://github.com/jackc/pgx/issues/1273#issuecomment-1224154013
2022-08-23 19:39:15 -05:00
Jack Christensen
fe3a4f3150
Standardize casing for NULL in error messages
2022-08-22 21:01:18 -05:00
Jack Christensen
2e73d1e8ee
Improve error message when failing to scan a NULL::json
2022-08-22 20:56:36 -05:00
Jack Christensen
0d5d8e0137
Fallback to other format when encoding query arguments
...
The preferred format may not be possible for certain arguments. For
example, the preferred format for numeric is binary. But if
shopspring/decimal is being used without jackc/pgx-shopspring-decimal
then it will use the database/sql/driver.Valuer interface. This will
return a string. That string should be sent in the text format.
A similar case occurs when encoding a []string into a non-text
PostgreSQL array such as uuid[].
2022-08-22 20:26:38 -05:00
Jack Christensen
ae65a8007b
Use higher pgconn.FieldDescription with string Name
...
Instead of using pgproto3.FieldDescription through pgconn and pgx. This
lets the lowest level pgproto3 still be as memory efficient as possible.
https://github.com/jackc/pgx/pull/1281
2022-08-20 10:04:18 -05:00
Jack Christensen
dbee461dc9
Update previous pgconn merge for v5
2022-08-19 17:42:04 -05:00
Jack Christensen
ef5655c563
Merge remote-tracking branch 'pgconn/master' into v5-dev
2022-08-19 17:36:29 -05:00
Stas Kelvich
15f8e6323e
Fix tests that check tls.Config.ServerName -- with SNI this field
...
is filled, unless SNI is delibaretely disabled. Also, do not set
SNI when host is an IP address as per RFC 6066.
2022-08-19 17:35:33 -05:00
Stas Kelvich
e3406d95f9
Add test coverage for client SNI
2022-08-19 17:35:33 -05:00
Stas Kelvich
067771b2e6
Set SNI for SSL connections
...
This allows an SNI-aware proxy to route connections. Patch adds a new
connection option (`sslsni`) to opt out of the SNI, to have the same
behavior as `libpq` does. See more in `sslsni` sections at
<https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS >.
2022-08-19 17:35:33 -05:00
Jack Christensen
8eae4a2a3e
Merge remote-tracking branch 'pgconn/master' into v5-dev
2022-08-13 10:19:49 -05:00
Nathan Giardina
faabb0696f
Fix for timeout when a single node has timed out, created a new context to allow for each db node to timeout individually
2022-08-13 10:18:55 -05:00
Jack Christensen
1d748d9bbf
Failsafe timeout for background pool connections
...
Do not override existing connect timeout.
2022-08-13 09:50:37 -05:00
Jack Christensen
c842802d65
Failsafe timeout for background pool connections
...
Do not override existing connect timeout.
2022-08-13 09:49:06 -05:00
Jack Christensen
7c6a31f9d2
CopyFrom parses strings to encode into binary format
...
https://github.com/jackc/pgx/issues/1277
https://github.com/jackc/pgx/issues/1267
2022-08-13 09:30:29 -05:00
Jack Christensen
02d9a5acd8
Fix naming of some tests
2022-08-13 08:41:06 -05:00
Jack Christensen
8256ab147f
Add build tag to skip default PG type registration
...
https://github.com/jackc/pgx/issues/1273#issuecomment-1207338136
2022-08-13 08:09:44 -05:00
Jack Christensen
906f709e0c
Fix typo in Windows code
...
https://github.com/jackc/pgx/issues/1274
2022-08-11 20:59:37 -05:00
Jack Christensen
33b782a96d
Potential fix for Windows
...
https://github.com/jackc/pgx/issues/1274
2022-08-11 20:55:50 -05:00
Jack Christensen
1453cd4b97
Update v5 status
2022-08-06 07:11:11 -05:00
Jack Christensen
6871a0c4a6
Add v5 testing note to readme
2022-08-06 07:10:37 -05:00
Jack Christensen
1819959d07
Merge branch 'master' into v5-dev
2022-08-06 06:41:33 -05:00
Jack Christensen
8f0c9557e4
Merge remote-tracking branch 'pgconn/master' into v5-dev
2022-08-06 06:33:10 -05:00
Jack Christensen
1f64122c42
Tweak changelog
2022-08-06 06:27:32 -05:00
Jack Christensen
5768a0c0bd
Update changelog
2022-08-06 06:24:41 -05:00
Jack Christensen
7ce634d62b
Ensure there is a timeout for background pool connections
2022-08-06 06:22:17 -05:00
Jack Christensen
f3e04b28cc
Go 1.19 go fmt
2022-08-06 06:20:50 -05:00
Jack Christensen
7ad36f386d
Upgrade dependencies
2022-08-06 06:11:07 -05:00
Jack Christensen
4c048d40d8
Update changelog
2022-08-06 06:07:40 -05:00
Jack Christensen
5192d9acc1
Upgrade 3rd party dependencies
2022-08-06 06:00:03 -05:00
Jack Christensen
0a539a9d92
Upgrade pgproto3
2022-08-06 05:58:55 -05:00
Peter Feichtinger
3cb99532f5
pgxpool: Make BeginTx success case clearer
2022-08-04 20:22:57 -05:00
Jack Christensen
0eda0109ca
Add Pool.Reset()
2022-07-30 12:22:29 -05:00
Jack Christensen
83670d675d
Upgrade golang.org/x/crypto
2022-07-30 12:17:00 -05:00
Jack Christensen
957671a6ec
Use puddle v2
2022-07-30 12:16:16 -05:00
Jack Christensen
033fc6f62a
Rename pgxpool.NewConfig to NewWithConfig
...
https://github.com/jackc/pgx/issues/1264
2022-07-30 09:16:42 -05:00
Jack Christensen
c3258b7f52
Fix scan pointer to pointer to nil slice
...
https://github.com/jackc/pgx/issues/1263
2022-07-30 09:10:50 -05:00