1877 Commits

Author SHA1 Message Date
Jack Christensen
775d3b1049 Fake success on example 2021-02-27 09:52:51 -06:00
Jack Christensen
30d44c0369 Test code instead of error message for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
378bd72b67 Allow flexible number types for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
44733732e4 Skip number type sensitive test on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
eaf3e84963 Add timeout to serialization failure test
When run with CockroachDB it appears to hang without the timeout.
2021-02-27 09:52:51 -06:00
Jack Christensen
bac0905915 Specify type for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
ef2adcee08 Skip number type dependent test for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
b01dd934e5 Allow different int size for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
fe3a710a5a Skip test depending on exact int types on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
9fe7962445 Skip another initially deferred test on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
80e7f6b0d3 Skip testing circle type on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
c588c47ddd Skip client_encoding test for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
3a27bcd459 Skip standard_conforming_strings = off test for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
5a16bad252 Skip deferred constraint tests on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
c4e66b05de Test accepts bigint vs int for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
f29aef4409 Skip test with serial on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
2e50e59491 Skip isolation level test for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
2f95f67ef5 Remove initially deferred when not needed
Makes test compatible with CockroachDB.
2021-02-27 09:52:51 -06:00
Jack Christensen
c8a7c89f15 Skip tests using pg_terminate_backend on CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
19441eee28 CockroachDB returns bigint instead of int 2021-02-27 09:52:51 -06:00
Jack Christensen
5f58e0e443 Cockroach DB uses different error code 2021-02-27 09:52:51 -06:00
Jack Christensen
ec5dfb472c Skip domain types for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
a6d902777d Skip LISTEN / NOTIFY tests for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
45c2b71377 Skip tests for cidr type for CockroachDB 2021-02-27 09:52:51 -06:00
Jack Christensen
909398127d Skip large objects tests for CockroackDB 2021-02-27 09:52:51 -06:00
Jack Christensen
37884a20e7 Use testify and more forgiving numeric equality
PostgreSQL generate_series can return type int while CockroachDB always
returns bigint.
2021-02-27 09:52:51 -06:00
Jack Christensen
ac2918b9a3 Add BeginFunc and BeginTxFunc
fixes #821
2021-02-20 18:30:18 -06:00
Jack Christensen
373bb84e9d Add *pgxpool.AcquireFunc
refs #821
2021-02-20 17:16:33 -06:00
Pau Sanchez
9b58ab2db8 Make ScanArgError fields public 2021-02-20 08:43:57 -06:00
Jack Christensen
927a15124e Update supported versions 2021-02-13 10:59:00 -06:00
Pau Sanchez
8ad672475a Make ScanArgError public to allow identification of offending column
fixes #931
2021-02-13 08:56:11 -06:00
Jack Christensen
922508c785 Replace Travis with Github CI 2021-01-30 17:17:42 -06:00
Fabrice Aneche
14050e286d fix data map 2021-01-27 16:36:58 -06:00
Fabrice Aneche
9b59dd0346 added a kitlog level log adapter 2021-01-27 16:36:58 -06:00
davidsbond
aa8604b5c2 Add Ping method to pgxpool.Conn
Adds the Ping method to pgxpool.Conn, returning the result of calling Ping on
the underlying pgx.Conn.
2021-01-26 20:46:57 -06:00
Robert Froehlich
210a217818 Add BeforeConnect callback to pgxpool.Config.
This allows for connection settings to be updated without having to create
a new pool. The callback is passed a copy of the pgx.ConnConfig and will
not impact existing live connections.
2021-01-02 15:08:59 -08:00
Musbah Sinno
b664891853 Updated CopyFromSlice example in doc.go
The example had a syntax error and didn't explain what user was to begin with. Fixed it.
2020-12-23 10:42:48 -06:00
Jack Christensen
fc4d50f6c2 Release v4.10.1 v4.10.1 2020-12-19 10:18:49 -06:00
Jack Christensen
9b0e57c4a9 Fix panic on query error with nil stmtcache
fixes #895
2020-12-19 10:17:41 -06:00
Jack Christensen
e8f959e0e1 Add QueryFunc
refs #821
2020-12-12 09:39:58 -06:00
Jack Christensen
0cbbf55dde Fix typo 2020-12-12 08:28:55 -06:00
Jack Christensen
e14638e125 Release v4.10.0 v4.10.0 2020-12-03 19:50:07 -06:00
Jack Christensen
8c7667376e Update dependencies 2020-12-03 19:43:27 -06:00
Jack Christensen
82bac82213 stdlib: consider any Ping failure as fatal
refs #672
2020-12-03 19:41:03 -06:00
Jack Christensen
0a2b67c5c5 CopyFromSlice should remember error 2020-12-02 09:32:01 -06:00
Egon Elbre
e23c5bec24 add pgx.CopyFromSlice
Using CopyFromRows can often be inconvenient to use, because you would
need to convert a typed array to an [][]interface{}. Similarly,
implementing a custom CopyFromSource is too verbose for one-off things.

Add CopyFromSlice that allows to more easily convert a slice to a
CopyFromSource. Example:

    copyCount, err := conn.CopyFrom(
        context.Background(),
        pgx.Identifier{"people"},
        []string{"first_name", "last_name", "age"},
        pgx.CopyFromSlice(len(rows), func(i int) ([]interface{}, error) {
            return []interface{user.FirstName, user.LastName, user.Age}, nil
        }),
    )
2020-12-02 11:16:36 +02:00
Ethan Pailes
1df45d758d fix stmtcache invalidation
This patch fixes jackc/pgx#841. The meat of the fix lives
in [a PR to the pgconn repo][1]. This change just checks
for errors after executing a prepared statement and informs
the underlying stmtcache about them so that it can properly
clean up. We don't try to get fancy with retries or anything
like that, just return the error and allow the application to handle it.

I had to make [some][1] [changes][2] to to the jackc/pgconn package as well
as this package.

Fixes #841

[1]: https://github.com/jackc/pgconn/pull/56
[2]: https://github.com/jackc/pgconn/pull/55
2020-11-12 08:15:13 -05:00
Jack Christensen
93c6b60429 Explicityly state pgxpool's concurrency-safety
refs #866
2020-11-09 17:01:51 -06:00
Jack Christensen
eeaa26abee Release v4.9.2 v4.9.2 2020-11-03 19:24:54 -06:00
Jack Christensen
d660c48ffc Upgrade pgconn to 1.7.2 to fix slice capacity issue
fixes #859
2020-11-03 19:23:01 -06:00