Commit Graph

3149 Commits (b6f5cbd15e1a11f13074f1996041fe310961a6d7)

Author SHA1 Message Date
Jack Christensen 2fad63c189 Set cap when returning slice from chunkReader 2022-02-26 09:37:14 -06:00
Jack Christensen e641d0a5ad Reuse connection read buffer
To avoid extra copies and small allocations previously large
read buffers were allocated and never reused. However, the down side of
this was greater total memory allocation and the possibility that a
reference to a single byte could pin an entire buffer.

Now the buffer is reused.
2022-02-26 09:31:45 -06:00
Jack Christensen 2e0ec225de Make Chunkreader an internal implementation detail 2022-02-26 08:50:46 -06:00
Jack Christensen d13f651810 Finish importing pgio as internal package 2022-02-21 14:35:20 -06:00
Jack Christensen 1be4c10ce4 Merge branch 'pgioimport' into v5-dev 2022-02-21 14:33:10 -06:00
Jack Christensen d35500e397 Move pgio 2022-02-21 14:32:55 -06:00
Jack Christensen 032ea5f5c0 Finish import of chunkreader 2022-02-21 14:29:39 -06:00
Jack Christensen 44375443e1 Merge branch 'chunkreaderimport' into v5-dev 2022-02-21 14:27:21 -06:00
Jack Christensen fd1a98f858 Move and clean for import 2022-02-21 14:27:05 -06:00
Jack Christensen 95cbbfe441 Import pgproto3
Also copy in pgmock as an internal package.
2022-02-21 13:22:42 -06:00
Jack Christensen e06cc67875 Merge branch 'pgproto3import' into v5-dev 2022-02-21 11:58:13 -06:00
Jack Christensen 04476c4a13 Move pgproto3 to subdirectory 2022-02-21 11:57:34 -06:00
Jack Christensen 43083cb0e3 Memoize pgtype.Map.PlanScan 2022-02-21 10:10:16 -06:00
Jack Christensen 9c538cd4a9 Remove actualTarget argument 2022-02-21 09:30:01 -06:00
Jack Christensen f3defbc150 Rename pgtype.None to pgtype.Finite 2022-02-21 09:25:30 -06:00
Jack Christensen 1f2f239d09 Renamed pgtype.ConnInfo to pgtype.Map 2022-02-21 09:13:09 -06:00
Jack Christensen bda10b2ec9 Rename pgtype.DataType to pgtype.Type 2022-02-21 09:01:48 -06:00
Jack Christensen a3c351d11a RegisterDataType now accepts *DataType 2022-02-21 08:49:04 -06:00
Jack Christensen 5daa487a2c Merge branch 'master' into v5-dev 2022-02-21 08:35:11 -06:00
Jack Christensen b6b24f9e8a Allocate connRows on demand instead of preallocating in bulk
The 64 element preallocatedRows may be pinning memory from previous
queries.

See https://github.com/jackc/pgx/issues/1127
2022-02-19 11:51:25 -06:00
Jack Christensen 1e565b0d44 Handle stmtCache.Get error previously thought impossible
The statement cache is already prefilled, but it is possible for the
ctx to be canceled between when the statement is prepared and when the
statement is retrieved for use.

refs #1156
2022-02-19 11:28:39 -06:00
William Storey ded272b1f2 Remove documentation line stating only one IP is used
With `expandWithIPs()` (added in #14), we try all IPs.
2022-02-19 08:10:07 -06:00
William Storey ccb96b8aca Fix typos in comments 2022-02-19 08:10:07 -06:00
Jack Christensen 34bf0a5df9 Upgrade golang.org/x/text to v0.3.7
https://github.com/jackc/pgconn/issues/103
2022-02-19 08:00:51 -06:00
Jack Christensen 9c5dfbdfb3 pgconn.CommandTag is now an opaque type
It now makes a copy instead of retaining driver memory. This is in
preparation to reuse the driver read buffer.
2022-02-12 10:26:26 -06:00
Jack Christensen e6680127e3 Reenable TestRowsScanNilThenScanValue 2022-02-12 09:40:33 -06:00
Jack Christensen 60da2914f3 Re-enable test 2022-02-12 09:37:12 -06:00
Jack Christensen a14f3f291f Re-enable domain type test 2022-02-12 09:35:52 -06:00
Jack Christensen 4b6d527b0b Merge branch 'master' into v5-dev 2022-02-12 09:22:37 -06:00
Jack Christensen 3650fc9f68 Remove comparison with alternatives from readme
lib/pq and go-pg are both in maintenance mode. No point in comparison.
2022-02-12 09:19:55 -06:00
Saimon Shaplygin 4ac1499060 ref: remove anchored code 2022-02-12 09:15:24 -06:00
Isabel Jimenez 71da600c3a exposing stdlib DB connector 2022-02-12 09:11:56 -06:00
Jack Christensen f861d83a17 Fix range types not clearing unbounded or empty 2022-02-08 16:48:17 -06:00
Jack Christensen 0306ce3a19 Fix scanning negative ints into Int64Scanner 2022-02-08 14:13:06 -06:00
Jack Christensen 1334d45d71 Parse array header to empty slices instead of nils 2022-02-08 11:35:40 -06:00
Jack Christensen bcc0af3f56 Fix scan empty array into multi-dimension slice 2022-02-08 11:12:05 -06:00
Jack Christensen 7193e48923 Restore multi-dimensional slices
Move ArrayCode to use pgtype wrapper pattern as well
2022-02-08 10:07:40 -06:00
Jack Christensen 318018504a Merge branch 'master' into v5-dev 2022-02-07 11:22:01 -06:00
Jack Christensen e2769993cc Merge remote-tracking branch 'pgconn/master' into v5-dev 2022-02-07 11:17:27 -06:00
Jack Christensen 2b7de82ef4 Release v4.15.0 2022-02-07 11:03:06 -06:00
Jack Christensen 67401de1c3 Upgrade to pgconn v1.11.0 2022-02-07 10:55:29 -06:00
Jack Christensen 3e5de44314 Release v1.11.0 2022-02-07 10:54:39 -06:00
Jack Christensen 6fea8eba5e Upgrade to pgtype v1.10.0 2022-02-07 10:52:30 -06:00
Jack Christensen 202542ead5 Release v1.10.0 2022-02-07 10:51:03 -06:00
Jack Christensen c9eefd852a Upgrade to puddle v1.2.1 2022-02-07 10:48:30 -06:00
Jack Christensen e8857f04a1 Make BatchResults.Close safe to be called multiple times
https://github.com/jackc/pgx/issues/1138
https://github.com/jackc/pgx/issues/938
2022-02-07 10:44:39 -06:00
Collin Forsyth f4252a58be correctly Scan type aliases for floating point types 2022-02-05 20:23:39 -06:00
Jack Christensen d02b2ed013 Add batch test for QueryRow without any rows
refs #1150
2022-02-05 20:12:35 -06:00
djsavvy 9eccdd6a81 Clarify that Values() and Scan() require Next() to have been called on the rows object 2022-02-05 20:06:01 -06:00
Jack Christensen 02372f1c3c Add DecodeValue to composites 2022-02-05 15:12:09 -06:00