3023 Commits

Author SHA1 Message Date
Jack Christensen
c323ab6662 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-04-23 10:48:44 -05:00
Jack Christensen
a92f1df1df Merge remote-tracking branch 'pgproto3/master' into v5-dev
Pull in pgproto3 changes and update for pgx v5
2022-04-23 10:43:48 -05:00
Jack Christensen
468b793282 Skip tests with unsupported types on CockroachDB 2022-04-23 10:34:53 -05:00
Jack Christensen
791176f4fe Add link to github.com/vgarvardt/pgx-google-uuid 2022-04-23 10:26:41 -05:00
Jack Christensen
9bb49f990f Release v1.12.0 2022-04-21 19:49:01 -05:00
Jack Christensen
1b244eec5d Upgrade to pgproto3 v2.3.0 2022-04-21 19:48:43 -05:00
Jack Christensen
cc7de81d3b Make array helpers private 2022-04-16 14:21:40 -05:00
Jack Christensen
1c90746cf5 Update CHANGELOG 2022-04-16 14:14:59 -05:00
Jack Christensen
e94cf1fbaa Remove AcquireConn and ReleaseConn
Superseded by (*sql.Conn) Raw()
2022-04-16 14:07:59 -05:00
Jack Christensen
a01a9ee6df Automatically register Array and FlatArray 2022-04-16 14:04:25 -05:00
Jack Christensen
fccaebc93d Add pgtype.Map.SQLScanner
This enables compatibility with database/sql for types that cannot
implement Scan themselves.
2022-04-16 13:38:27 -05:00
Jack Christensen
f1a4ae3070 Add Array and FlatArray container types 2022-04-16 11:33:45 -05:00
Jack Christensen
d4abe83edb Revert use generics for RangeCodec
Reverted almost all of 976b1e0.

Still may consider a way to get DecodeValue to be strongly typed but
that feature isn't worth the complications of generics. Especially in
that applying this style to ArrayCodec would make Conn.LoadType
impossible for arrays.
2022-04-16 10:39:12 -05:00
Jack Christensen
8b483e4223 Use generic / type safe puddle for pgxpool 2022-04-16 09:28:46 -05:00
Jack Christensen
beb4e2cfbc SQLCODE 42501 is fatal connect error
Don't try fallback configs. Match libpq behavior.

fixes https://github.com/jackc/pgconn/issues/108
2022-04-16 07:26:56 -05:00
Oliver Tan
90ef5bba3f add GSSAPI authentication
This commit adds the GSSAPI authentication to pgx. This roughly follows
the lib/pq implementation:
* We require registering a provider to avoid mass dependency inclusions
  that may not be desired (https://github.com/lib/pq/issues/971).
* Requires the pgproto3 package be updated. I've included my custom fork
  for now.
2022-04-15 08:17:48 -05:00
Jack Christensen
b03b1666a6 Add Hijack to pgxpool.Conn 2022-04-14 11:50:12 -05:00
Oliver Tan
175856ffd3 add GSS authentication to pgproto3 2022-04-12 07:13:21 -05:00
Jack Christensen
1ef2cee36e Update changelog 2022-04-09 10:26:45 -05:00
Jack Christensen
976b1e03a9 Use generics for RangeCodec
This allows DecodeValue to return a more strongly typed value.
2022-04-09 10:21:17 -05:00
Jack Christensen
c8025fd79a Use generics for Range values 2022-04-09 09:34:37 -05:00
Jack Christensen
f14fb3d692 Replace interface{} with any 2022-04-09 09:12:55 -05:00
Jack Christensen
95265a7421 Use Go 1.18 2022-04-09 09:11:19 -05:00
Jack Christensen
829babcea9 Better number to string handling
Avoid ambiguity of stringWrapper implementing Int64Scanner and
Float64Scanner.
2022-04-09 09:09:46 -05:00
Matthew Gabeler-Lee
5982e4b4f8 fix detection of database does not exist error during connect 2022-04-09 07:47:59 -05:00
Mukundan Kavanur Kidambi
c6ccb4b9a3 Addressing feedback 2022-04-02 18:58:59 -05:00
Mukundan Kavanur Kidambi
e145003288 Addressing feedback 2022-04-02 18:58:59 -05:00
Mukundan Kavanur Kidambi
1d7886b012 Adding UTs 2022-04-02 18:58:59 -05:00
Mukundan Kavanur Kidambi
fa2b096400 fix: Adding overall format before appending ColumnFormatCodes 2022-04-02 18:58:59 -05:00
Jack Christensen
8cf6721d66 Better int64 / numeric compat and text fixes v5.0.0-alpha.2 2022-04-02 16:55:05 -05:00
Jack Christensen
53ec52aa17 Fix out of date pgtype/int_test.go.erb 2022-04-02 14:41:33 -05:00
Jack Christensen
ee93440ac1 pgtype uses pgxtest
Added ValueRoundTripTest to pgxtest
Removed pgtype/testutil

pgtype tests now run with all (applicable) query modes. This gives
better coverage than before and revealed several bugs which are also
fixed in this commit.
2022-04-02 14:34:19 -05:00
Jack Christensen
83e50f21e8 Extract SkipCockroachDB to pgxtest 2022-04-02 10:35:13 -05:00
Jack Christensen
e18d76b798 Initial extraction of pgxtest
- Introduce ConnTestRunner
- RunWithQueryExecModes
2022-04-02 10:26:47 -05:00
Jack Christensen
e392908c72 Remove Int64Valuer implementation from stringWrapper 2022-04-02 08:24:55 -05:00
Jack Christensen
500c0721d7 Improve error messages for query argument encoding 2022-04-01 18:00:25 -05:00
Jack Christensen
3a6d9490e5 Only test numeric infinity on PG 14+ 2022-03-26 11:38:31 -05:00
Jack Christensen
600c4fd931 Skip test for Cockroach CI 2022-03-22 20:44:17 -05:00
Jack Christensen
103dfe145e Test should always close rows 2022-03-22 20:41:05 -05:00
Jack Christensen
7b31b56de9 Reactivate CI for other DB versions 2022-03-22 20:33:24 -05:00
Jack Christensen
e04b35bfcb Make pgtype test compat with CockroachDB when possible 2022-03-22 20:33:24 -05:00
Jack Christensen
210ebb4a50 Disable incomptible test with CockroachDB 2022-03-22 20:33:24 -05:00
Jack Christensen
0fd0688d4f Alter some tests for CockroachDB 2022-03-22 20:33:24 -05:00
Jack Christensen
69580cd519 Fix a test failure 2022-03-22 20:33:24 -05:00
Jack Christensen
95c03dc9ae Unskip and fix tests 2022-03-22 20:33:24 -05:00
Jack Christensen
793eb53017 Enable test with updated error message 2022-03-22 20:33:24 -05:00
Jack Christensen
29bec2b97e Remove skipped test for scan binary to string
Receiving a binary value and encoding it back into text seems to be an
anti-pattern to may. Don't want to silently enable this. May be able to
reverse course later if necessary.
2022-03-22 20:33:24 -05:00
Jack Christensen
0cd7c757c3 Fix skipped test 2022-03-22 20:33:24 -05:00
Jack Christensen
be5a6cc9c0 Remove obsolete test 2022-03-22 20:33:24 -05:00
Jack Christensen
5ca048ed2d Fix crash with pointer to nil struct 2022-03-22 20:33:24 -05:00