Commit Graph

3154 Commits (cb48716c67cd6d1341ef565fff12467993ae9b40)

Author SHA1 Message Date
Jack Christensen cb48716c67 Update to new package path 2022-07-23 07:31:14 -05:00
Jack Christensen d433545662 Remove obsolete doc 2022-07-23 07:06:22 -05:00
Jack Christensen f07ad22f14 Update PgBouncer docs 2022-07-23 07:04:32 -05:00
Jack Christensen 7c81972938 Update line wrapping in docs 2022-07-23 07:04:23 -05:00
Jack Christensen a5b4f888c2 Fix flickering test on CI
Ensure the conn reads everything expected before closing.
2022-07-16 18:16:19 -05:00
Jack Christensen b6f5cbd15e Add Conn to Rows interface
https://github.com/jackc/pgx/issues/1191
2022-07-16 17:56:24 -05:00
Jack Christensen 29254180ca Add callback functions to queued queries
Improve batch query ergonomics by allowing the code to handle the
results of a query to be right next to the query.
2022-07-16 17:46:47 -05:00
Jack Christensen 78875bb95a Add tracing support
Replaces existing logging support. Package tracelog provides adapter for
old style logging.

https://github.com/jackc/pgx/issues/1061
2022-07-16 12:27:10 -05:00
Jack Christensen 9201cc0341 ConnectConfig copies config 2022-07-16 08:58:43 -05:00
Jack Christensen 759e47dba3 Merge branch 'master' into v5-dev 2022-07-12 07:26:00 -05:00
Jack Christensen d5807f01ed Restore test from v4 2022-07-12 06:57:56 -05:00
Jack Christensen 93c79d7d41 Merge remote-tracking branch 'pgtype/master' into v5-dev 2022-07-12 06:52:59 -05:00
Jack Christensen 0f7b95c3a4 Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-07-12 06:45:54 -05:00
Jack Christensen 3dc9d17757 Document new ResultReader.Values behavior 2022-07-11 21:17:45 -05:00
Jack Christensen f0cd9cb867 Update CommandTag comment 2022-07-11 21:09:55 -05:00
Jack Christensen aaacdbf3ea Use string internally for CommandTag 2022-07-11 21:09:03 -05:00
Jack Christensen 786de2bda8 Use correct cache 2022-07-11 20:42:55 -05:00
Jack Christensen 224393188d Fix InetCodec.DecodeValue 2022-07-11 08:07:23 -05:00
Jack Christensen a059d1099f pgxpool pools always connect lazily
Rename constructor functions now that they don't actually connect.
2022-07-10 14:58:30 -05:00
Jack Christensen ca41a6a222 Update docs 2022-07-10 14:32:08 -05:00
Jack Christensen e7eb8a3250 Use netip package for representing inet and cidr types 2022-07-10 14:31:55 -05:00
Jack Christensen 7974a102fc Improve Scan error messages 2022-07-09 21:47:39 -05:00
Jack Christensen b662ab6767 Better encode error message 2022-07-09 21:40:44 -05:00
Jack Christensen 731daea586 Skip test on CockroachDB 2022-07-09 21:08:15 -05:00
Jack Christensen 80a529fcb7 Test LoadType disambiguate name by schema 2022-07-09 17:48:46 -05:00
Jack Christensen 31ec18cc65 Replace Begin and BeginTx methods with functions 2022-07-09 17:25:55 -05:00
Jack Christensen 62f0347586 Add CollectOneRow 2022-07-09 16:59:29 -05:00
Jack Christensen 90c2dc6f68 Rename ForEachScannedRow to ForEachRow 2022-07-09 16:47:28 -05:00
Jack Christensen da192291f7 Add CollectRows and RowTo* functions
Collect functionality was originally developed in pgxutil
2022-07-09 16:39:42 -05:00
Jack Christensen 3dafb5d4ee Skip test with non-standard CRDB behavior 2022-07-09 10:21:17 -05:00
Jack Christensen c31b89a3f2 Delay handling invalidated statements when in transaction 2022-07-09 10:20:54 -05:00
Jack Christensen e7aa76ccf9 SendBatch now uses pipeline mode to prepare and describe statements
Previously, a batch with 10 unique parameterized statements executed
100 times would entail 11 network round trips. 1 for each prepare /
describe and 1 for executing them all. Now pipeline mode is used to
prepare / describe all statements in a single network round trip. So it
would only take 2 round trips.
2022-07-09 09:32:36 -05:00
Jack Christensen ba58e3d5d2 Fix pipeline prepare query without row results 2022-07-09 08:32:12 -05:00
Jack Christensen 76946fb5a3 Replace QueryFunc with ForEachScannedRow 2022-07-07 20:29:04 -05:00
Jack Christensen a86f4f3db9 Add deallocate to pipeline mode 2022-07-07 19:32:01 -05:00
Jack Christensen 1168b375e4 Expose pgx functionality for manual integration with pgconn
This is primarily useful for using pipeline mode.
2022-07-04 13:29:49 -05:00
Jack Christensen f7433cc5f2 Fix typo 2022-07-04 06:20:15 -05:00
Jack Christensen f635b43a6b Use bigint in tests for CockroachDB compatibility
CRDB automatically changes int4 to int8.
2022-07-02 22:00:42 -05:00
Jack Christensen a97ba0c34a Remove ReceiveResults
Pipeline mode should be used instead.
2022-07-02 21:50:07 -05:00
Jack Christensen ae2881a23c Add pipeline mode to pgconn 2022-07-02 21:48:16 -05:00
sergey.bashilov a18df2374a add ignore not preferred err flag in connect func 2022-07-02 07:04:50 -05:00
sergey.bashilov cdc240d920 rename error 2022-07-02 07:04:50 -05:00
sergey.bashilov 618a12a094 remove HasPreferStandbyTargetSessionAttr, rename error to indicate server is not standby 2022-07-02 07:04:50 -05:00
sergey.bashilov 1b6543f29c fix typos 2022-07-02 07:04:50 -05:00
sergey.bashilov 25935a39b6 add prefer-standby target_session_attrs 2022-07-02 07:04:50 -05:00
Jack Christensen ed3e9f1dd4 Check for more specific error 2022-07-01 15:33:12 -05:00
Jack Christensen 585022440b Update changelog 2022-06-25 18:11:39 -05:00
Jack Christensen 03da9fcec6 Check conn liveness before using when idle for more than 1 second
Implemented in pgxpool.Pool and database/sql.

https://github.com/jackc/pgx/issues/672
2022-06-25 17:58:53 -05:00
Jack Christensen 26eda0f86d Check for ENV conn string and skip test if missing 2022-06-25 16:55:09 -05:00
Jack Christensen 9afd320b9e Fix flickering test in CI
While this test always worked on my machine, it flickered in CI. And to
be fair the test can't guarantee the condition it is testing. Work
around this by trying many times before admitting failure.
2022-06-25 16:05:20 -05:00