3405 Commits

Author SHA1 Message Date
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
Jack Christensen
6b52e0b5e0 Contributing guide now includes instructions to test client ssl auth 2022-10-29 19:00:29 -05:00
Jack Christensen
9eaeb51e30 Fix CI PostgreSQL user permissions 2022-10-29 17:55:13 -05:00
Jack Christensen
8b2ac8c18f Fix unix domain socket tests on CI 2022-10-29 17:45:13 -05:00
Jack Christensen
05e9234c2e Upgrade setup-go and checkout actions to v3 2022-10-29 17:29:10 -05:00
Jack Christensen
97d1012f42 Use testsetup/postgresql_setup.sql in CI 2022-10-29 17:27:39 -05:00
Jack Christensen
6bedfa7def Use testsetup/pg_hba.conf in CI 2022-10-29 17:23:13 -05:00
Jack Christensen
55b5067ddd Improve testing / contributing instructions
* Extract CONTRIBUTING.md
* Add instructions and scripts to setup standalone PostgreSQL server
  that tests the various connection and authentication types.
2022-10-29 17:14:09 -05:00
Jack Christensen
1ec3816a20 pgconn and pgproto use same environment variable for tests as pgx 2022-10-29 13:23:25 -05:00
Jack Christensen
c9c166b8b2 Fix TestConnCopyFromDataWriteAfterErrorAndReturn always being skipped 2022-10-29 13:17:52 -05:00
Jack Christensen
9a207178f6 Fix TestConnCheckConn always being skipped 2022-10-29 13:16:05 -05:00
Jack Christensen
3feeddd9f1 Fix tests when PGUSER is different than OS user 2022-10-29 13:12:03 -05:00
Jack Christensen
72c89108ad Fix tests when PGPORT set to non-default value 2022-10-29 13:06:53 -05:00
Jack Christensen
c130b2d74a Update CopyFrom documentation to be clearer
Regarding binary requirement and enums in particular.

https://github.com/jackc/pgx/issues/1338
2022-10-29 09:48:45 -05:00
Jack Christensen
7d3b9c1e44 QueryRewriter.RewriteQuery now returns an error
https://github.com/jackc/pgx/issues/1186#issuecomment-1288207250
2022-10-29 09:33:13 -05:00
Jack Christensen
6515e183ff Update doc example for pgx.ForEachRow
fixes https://github.com/jackc/pgx/issues/1360
2022-10-29 08:59:57 -05:00
Jack Christensen
e35041372d Remove mistakenly included replace directive in go.mod 2022-10-29 08:56:49 -05:00
Jack Christensen
6fabd8f5b1 Fix encoding uint64 larger than math.MaxInt64 into numeric
fixes https://github.com/jackc/pgx/issues/1357
2022-10-29 08:47:12 -05:00
Jack Christensen
c00fb5d2a1 Upgrade to puddle v2.0.1 2022-10-29 08:09:54 -05:00
Jack Hopner
55d5d036c0 add pgx xray tracer to readme 2022-10-27 19:42:36 -05:00
Jack Christensen
987de3874e Update changelog v5.0.4 2022-10-24 19:11:50 -05:00
Jack Christensen
3ad9995dfe Exec checks if tx is closed
https://github.com/jackc/pgx/discussions/1350
2022-10-24 18:23:26 -05:00
Baptiste Fontaine
3e825ec898 Fix RowToStructByPos on structs with multiple anonymous sub-structs
Fixes #1343
2022-10-22 10:02:32 -05:00