1831 Commits

Author SHA1 Message Date
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
Jack Christensen
9898beaa2d Release v4.9.1 v4.9.1 2020-10-31 17:36:36 -05:00
Jack Christensen
59a40dbf84 Upgrade pgconn and pgtype 2020-10-31 17:30:27 -05:00
Jack Christensen
7c47415150 Fix SendBatch of all prepared statements with statement cache disabled
fixes #856
2020-10-29 20:28:57 -05:00
Oleg Kovalov
5f8d853b34 remove unused definitions on conn.go 2020-10-12 08:13:52 -05:00
drpytho
0c145a3faa Add/Copy docstring from puddle 2020-10-06 09:04:33 -05:00
Oleg Kovalov
5ebf34e484 remove unused definitions on messages.go 2020-10-05 19:31:25 -05:00
Oleg Kovalov
557018a24e use simpler strings funcs 2020-10-05 19:26:33 -05:00
Jack Christensen
2a8ae6f269 Release v4.9.0 v4.9.0 2020-09-26 11:58:01 -05:00
Jack Christensen
f23bd4824d Upgrade pgtype to v1.5.0 2020-09-26 11:56:52 -05:00
Jack Christensen
3e9614fdb4 Upgrade pgconn to v1.7.0 2020-09-26 11:56:52 -05:00
Jack Christensen
f9204b4c10 Upgrade puddle to v1.1.2 2020-09-26 11:56:52 -05:00
Harmen
040df1ccef fix link to 'pgtype' repo 2020-09-10 09:30:26 -05:00
Jack Christensen
a8abb80082 Update CI Go versions 2020-09-05 13:26:19 -05:00
Jack Christensen
d4a300bd58 Fix: FieldDescriptions are available on Rows before calling Next 2020-09-05 13:24:57 -05:00
Jack Christensen
2ec377350b Update Rows.Scan documentation to reflect reality.
Previously, the Scan documentation stated that scanning into a []byte
will skip the decoding process and directly copy the raw bytes received
from PostgreSQL.

This has not been true for at least 2 months. It is also undesirable
behavior in some cases such as a binary formatted jsonb. In that case
the '1' prefix needs to be stripped to have valid JSON. If the raw
bytes are desired this can easily be accomplished by scanning into
pgtype.GenericBinary or using Rows.RawValues.

In light of the fact that the new behavior is superior, and that it has
been in place for a significant amount of time, I have decided to
document the new behavior rather than change back to the old behavior.
2020-09-05 11:26:19 -05:00
Jinzhu
5b06f03d0a Fix SimpleProtocol with prepared statement 2020-08-31 17:06:36 -05:00
Jack Christensen
43ce317556 Plan scans even if destination is nil
fixes #810
2020-08-21 18:34:52 -05:00
Jack Christensen
997a16dbc5 Update pgconn for renamed CleanupChan 2020-08-20 22:09:50 -05:00
Jack Christensen
39b096d01e pgxpool waits for connection cleanup to finish before making room in pool
refs #679
2020-08-20 22:04:56 -05:00
Jack Christensen
e9579e6249 Release v4.8.1 v4.8.1 2020-07-29 22:19:49 -05:00
Jack Christensen
cce1d671f4 Update pgconn to v1.6.4 2020-07-29 22:18:05 -05:00
Jack Christensen
b8c5857880 Release v4.8.0 v4.8.0 2020-07-22 06:49:50 -05:00
Jack Christensen
4ebf1d2e0b Passthrough all parameters directly to pgx 2020-07-18 08:44:57 -05:00
Jack Christensen
42cbd0fa46 Release v4.7.2 v4.7.2 2020-07-14 12:07:51 -05:00
Jack Christensen
47cc8bb43e Update pgconn and pgtype dependencies 2020-07-14 12:03:00 -05:00
Jack Christensen
9b480f4785 Terminate connection when Commit fails and leaves tx open
refs #787
2020-07-13 22:49:35 -05:00
Jack Christensen
c8a9da960c Revert "stdlib: close connection on Tx commit or rollback that doesn't end Tx"
This reverts commit 2583134306da7d77427188acc1163aa636e28904.

This fix should actually be on the main Tx implementation.
2020-07-13 22:48:28 -05:00
Jack Christensen
2583134306 stdlib: close connection on Tx commit or rollback that doesn't end Tx
refs #787
2020-07-13 22:40:42 -05:00
Jack Christensen
5b498c4529 Link to https://github.com/georgysavva/scany
refs #788
2020-07-13 07:18:36 -05:00
Jack Christensen
11428bbc02 Document methods on Rows allowed to be called after Close() 2020-07-02 18:35:47 -05:00
Jack Christensen
eeda0368e6
Merge pull request #784 from zikaeroh/fix-column-perf
Cache column names in stdlib Rows
2020-06-29 14:40:23 -05:00
zikaeroh
84510c4590 Cache column names in stdlib Rows 2020-06-29 10:20:13 -07:00
Jack Christensen
3568b908c0 Release v4.7.1 v4.7.1 2020-06-29 10:43:18 -05:00
Jack Christensen
bf47a3d0a4 Fix stdlib decoding error with certain order and combination of fields
fixes #781
2020-06-29 09:38:53 -05:00
Jack Christensen
34cbb61138 Release v4.7.0 v4.7.0 2020-06-27 12:31:13 -05:00
Jack Christensen
8de0c48af0 Update dependencies 2020-06-27 12:30:58 -05:00
Jack Christensen
f8a5bc8273 Do not kill connection on transaction commit failure
fixes #780
2020-06-27 12:10:33 -05:00
Jack Christensen
1f68908da6 Update changelog 2020-06-06 11:09:32 -05:00
Jack Christensen
59a28af6de Update dependencies 2020-06-06 11:00:22 -05:00
Jack Christensen
2758cbc0c4 Remove unnecessary allocation in rows.Values()
This was originally done to fix #386. But subsequent changes to pgtype
render the allocation unnecessary. Tests put in place with the original
fix still pass.
2020-06-06 10:39:33 -05:00
Jack Christensen
4e50623069 Fix stdlib number size conversions 2020-06-06 09:54:19 -05:00
Jack Christensen
81140f6c27 Improve stdlib performance with large results 2020-06-06 09:49:14 -05:00
Jack Christensen
73d0ac206c
Merge pull request #768 from georgysavva/fix-exposed-config
Fix exposed config
2020-06-06 07:05:13 -05:00
georgysavva
e29ce9f6d6 Add Config.Copy() in pgx and pgxpool packages. Conn.Config() and Pool.Config() return copy of the original config. 2020-06-02 13:35:05 +03:00
georgysavva
608451a215 Store original config in Conn before updating it. 2020-06-01 19:38:12 +03:00
Jack Christensen
0e04d8187e Add raw benchmark 2020-06-01 08:53:45 -05:00