Commit Graph

3295 Commits (a86acf61e03274a208bbf44a5fe6d70df850e8d6)

Author SHA1 Message Date
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 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
Jeff Koenig ba100785cc fix: bump text package for CVE-2022-32149
https://security.snyk.io/vuln/SNYK-GOLANG-GOLANGORGXTEXTLANGUAGE-3043869
2022-10-22 09:07:24 -05:00
Jack Christensen 48b4807b33 Fix some reflect Kind checks to first check for nil
fixes https://github.com/jackc/pgx/issues/1335
2022-10-22 08:57:49 -05:00
Jack Christensen 6e40968cfc CollectOneRow prefers PostgreSQL error over pgx.ErrorNoRows
fixes https://github.com/jackc/pgx/issues/1334
2022-10-22 08:44:06 -05:00
Jack Christensen 11e5f68ff6 Update changelog for v5.0.3 2022-10-14 19:11:11 -05:00
Baptiste Fontaine 7a9e70d1e0 Fix some bad rows.Err() handlings in tests 2022-10-14 19:02:44 -05:00
Jack Christensen f2e7c8144d reflect.TypeOf can return nil. Check before using
https://github.com/jackc/pgx/issues/1331
2022-10-12 20:03:51 -05:00
Jack Christensen aff180b192 Remove dead code 2022-10-12 19:58:06 -05:00
Jack Christensen a581124dea Encode with driver.Valuer after trying TryWrapEncodePlanFuncs
However, all builtin TryWrapEncodePlanFuncs check for driver.Valuer and
skip themselves if it is found.
2022-10-12 19:52:57 -05:00
Jack Christensen c4407fb36e Prevent infinite loop for driver.Valuer / Codec edge case
A `driver.Valuer()` results in a `string` that the `Codec` for the
PostgreSQL type doesn't know how to handle. That string is scanned into
whatever the default type for that `Codec` is. That new value is
encoded. If the new value is the same type as the original type than an
infinite loop occured. Check that the types are different.

https://github.com/jackc/pgx/issues/1331
2022-10-12 19:46:15 -05:00
Jack Christensen 094ad9c9d8 Update changelog for v5.0.2 2022-10-08 18:58:17 -05:00