Commit Graph

3527 Commits (1a9b2a53a543a9adbad04b08d3ebafaa4a6b3fdf)

Author SHA1 Message Date
Ben Weintraub 29ad306e47 Make MaxConnLifetimeJitter setting actually jitter 2022-12-20 20:18:26 -06:00
Jack Christensen f42af35884 Add support for single dimensional arrays
https://github.com/jackc/pgx/issues/1442
2022-12-20 20:12:12 -06:00
Yevgeny Pats 11fa083a0d fix: Improve errors in batch modes 2022-12-20 19:33:46 -06:00
Mark Chambers 1ce3e0384a pgtype Int fix minimum error message.
Previously on the minimum condition the error would be:

  "is greater than maximum"

Also add encoding/json import into the .erb template as the import was
missing after running rake generate.
2022-12-17 09:10:02 -06:00
Alejandro Do Nascimento Mora e58381ac94 Enable some CopyFrom tests for cockroachDB
CockroachDB added support for COPY in version 20.2.

https://www.cockroachlabs.com/docs/v20.2/copy-from

There are some limitations on the implementation, that's why not all the
existing tests were enabled.
2022-12-12 18:22:32 -06:00
Jack Christensen 279c3c0a20 Fix: json values work with sql.Scanner
https://github.com/jackc/pgx/issues/1418
2022-12-06 19:44:55 -06:00
Jack Christensen 17f8f7af63 Release v5.2.0 2022-12-05 20:41:55 -06:00
Jack Christensen f0a73424b1 Fix: Scan uint and uint64 ScanNumeric
fixes https://github.com/jackc/pgx/issues/1414
2022-12-05 20:34:46 -06:00
Vitalii Solodilov 88b373f9ee Skipped multirange tests for postgres less than 14 version 2022-12-01 19:33:33 -06:00
Vitalii Solodilov 8e2de2fefa Conn.LoadType supports range and multirange types (#1393)
Closes #1393
2022-12-01 19:33:33 -06:00
Nazar Vovk 24c53259f8 Fix typo 2022-11-28 09:36:20 -06:00
ksco 8eb062f588 perf(tx): use strings.Builder to avoid the overhead of []byte -> string conversion 2022-11-25 12:39:22 -06:00
Petr Evdokimov fbfafb3edf Optimize 'beginSQL' runtime and memory allocations 2022-11-22 09:00:12 -06:00
Vitalii Solodilov 174224fa07 The tracelog.TraceLog implements the pgx.PrepareTracer interface
Allows Tracelog to log the Prepare queiries.

Fixes #1383

Unit tests:
* added logger.Clear method to cleanup old log messages
* added logger.FilterByMsg to get only specific logs for assertions. When quieries are executed using different query exec methods prepare query can be not executed. So we can get different number of logs using different exec methods.
2022-11-19 07:43:39 -06:00
Jack Christensen 8ad1394f4c Update changelog for v5.1.1 2022-11-17 19:47:09 -06:00
Bodo Kaiser 56633b3d51 removed unnecessary name argument from DeallocateAll 2022-11-17 19:41:18 -06:00
Jack Christensen ba4bbf92af Fix query sanitizer
...when query text has contains Unicode replacement character.
uft8.RuneError actually is a valid character.
2022-11-14 18:32:26 -06:00
Jack Christensen b4d2eae777 Update changelog 2022-11-12 11:02:55 -06:00
Bodo Kaiser 3520c2ea43 updated DeallocateAll to also reset client-side statement and description cache 2022-11-12 10:57:31 -06:00
Bodo Kaiser c94c47f584 added DeallocateAll to pgx.Conn to clear prepared statement cache 2022-11-12 10:57:31 -06:00
Jack Christensen 8678ed560f Update puddle to v2.1.2 2022-11-12 10:42:08 -06:00
Jack Christensen 05924a9d6b Update CONTRIBUTING.md 2022-11-12 10:42:02 -06:00
Jack Christensen 2e9e2865f9 Added more docs and tests 2022-11-12 10:13:20 -06:00
Pavlo Golub 14be51536b implement `RowToStructByName` and `RowToAddrOfStructByName` 2022-11-12 09:39:54 -06:00
Jack Christensen 1376a2c0ed Update Go doc badge 2022-11-12 09:23:07 -06:00
Jack Christensen 932f676cfd Remove PG 10 from CI and add PG 15 to CI
PG 10 is now out of support.
2022-11-12 09:20:48 -06:00
Jack Christensen 5b6fb75669 Conn.LoadType supports domain types
If the underlying type is registered then use the same Codec.

fixes https://github.com/jackc/pgx/issues/1373
2022-11-12 08:11:37 -06:00
Jack Christensen b265fedd75 Correct error message 2022-11-12 07:06:54 -06:00
Jack Christensen 871f14e43b Fix text decoding of dates with 5 digit years 2022-11-12 07:01:11 -06:00
Jack Christensen 071d1c9467 DateCodec.DecodeValue can return pgtype.InfinityModifier
Previously, an infinite value was returned as a string. Other types
that can be infinite such as Timestamptz return a
pgtype.InfinityModifier. This change brings them into alignment.
2022-11-12 06:27:41 -06:00
Jack Christensen 29109487ec DateCodec.DecodeDatabaseSQLValue returns time.Time when possible
Previously it returned a string. However, this was an unintended
behavior change from pgx v4.

89f69aaea9 (commitcomment-89173737)
2022-11-12 06:21:48 -06:00
Jack Christensen daf570c752 Date text encoding pads year with 0 for at least 4 digits
e.g. 0007-01-02 instead of 7-01-02

89f69aaea9 (commitcomment-89173737)
2022-11-12 06:14:04 -06:00
Jack Christensen a86acf61e0 Fix encode ErrorResponse
fixes https://github.com/jackc/pgx/issues/1371
2022-11-11 18:20:16 -06:00
Jack Christensen a968ce3437 Add typed nil behavior change note to changelog
https://github.com/jackc/pgx/issues/1367
2022-11-03 21:24:44 -05:00
Jack Christensen 39676004de Fix logger string truncation with UTF-8
fixes #1365
2022-11-03 20:50:30 -05:00
Jack Christensen 6f90866f58 Expose underlying pgconn GetSSLPassword support to pgx
pgconn supports a GetSSLPassword function but the pgx connection
functions did not expose a means of using it.

See PR #1233 for more context.
2022-11-03 20:09:52 -05:00
Jack Christensen d8c04249d1 Give up on that test in CI
The test works if I use upterm and run manually on the CI server...
TLS is tested in the TLS with client certificate tests anyway.
2022-10-31 22:37:05 -05:00
Jack Christensen 7fd064ab80 Disable upterm 2022-10-31 22:28:50 -05:00
Jack Christensen 0013f6c7ca Enable upterm 2022-10-31 22:20:58 -05:00
Jack Christensen 95498282bb more ci 2022-10-31 22:10:37 -05:00
Jack Christensen 6e77e0a09d Fight with CI some more 2022-10-31 22:05:35 -05:00
Jack Christensen 1f0fd66623 Go back to Ubuntu 20.04 on CI
Should fix some strange openssl / TLS issues.
2022-10-31 21:57:38 -05:00
Jack Christensen 45aeaed20a Remove unused pg-version matrix 2022-10-31 21:28:58 -05:00
Jack Christensen a2da398dff Partial CI fixes 2022-10-31 21:24:57 -05:00
Jack Christensen be419e25b4 Use des3 for certs in testing / CI 2022-10-31 19:42:22 -05:00
Jack Christensen dd07e24a6c sudo the CI 2022-10-31 19:34:59 -05:00
Jack Christensen 0920c79b02 Test SCRAM, sslmode=verify-full and client cert auth on CI 2022-10-31 19:30:22 -05:00
Jack Christensen 268af3903c Upgrade CI to ubuntu-22.04 2022-10-31 19:10:49 -05:00
Jack Christensen 4d711aaa73 Remove v5-dev branch from CI 2022-10-31 19:10:21 -05:00
Jack Christensen dc85718658 Remove unused code from CI script 2022-10-29 19:02:04 -05:00