jennifersp
73bbced270
add byte length check to uint32
2024-08-23 16:17:07 -07:00
Jack Christensen
b197994b1f
Merge pull request #2112 from jennifersp/master
...
support text scanner for binary format for uint32
2024-08-23 07:05:15 -05:00
jennifersp
57fd684068
update struct name
2024-08-22 16:51:42 -07:00
jennifersp
926913ad66
rm bound check
2024-08-21 15:12:36 -07:00
jennifersp
b9f77cb1b3
fix typo
2024-08-21 12:27:23 -07:00
jennifersp
218c15a4eb
support text scanner for binary format for uint32
2024-08-21 12:04:54 -07:00
Jack Christensen
4f7e19d67d
Merge pull request #2108 from jackc/ci-tests-go-1.23
...
CI tests Go 1.23
2024-08-15 18:41:48 -05:00
Jack Christensen
0cbc5db39d
CI tests Go 1.23
2024-08-15 18:33:43 -05:00
Jack Christensen
5747f37d9c
Fix: Scan and encode types with underlying types of arrays
...
Rather than special case the reported issue with UUID and [16]byte, this
commit allows the system to find the underlying type of any type that is
an array.
fixes https://github.com/jackc/pgx/issues/2107
2024-08-15 18:20:07 -05:00
Jack Christensen
d6fc8b02b4
Merge pull request #2098 from stringintech/tracelog-time-key
...
add TraceLogConfig with customizable TimeKey and ensureConfig method for default initialization
2024-08-13 18:39:21 -05:00
Jack Christensen
c457de62c9
Fix doc discrepancies between Tx interface and pgxpool implementation
...
The error is not wrapped at the moment, but document that it may be.
fixes https://github.com/jackc/pgx/issues/2104
2024-08-07 08:03:41 -05:00
stringintech
216049c62b
add TraceLogConfig with customizable TimeKey and ensureConfig method for default initialization
2024-07-26 22:58:14 +03:30
Jack Christensen
a68e14fe5a
Explicitly disclaim support for time with time zone
2024-07-23 17:27:05 -05:00
Jack Christensen
ea9610f672
Merge pull request #2084 from EpicStep/multiple-tracing
...
Implement 'MultiTracer'
2024-07-15 08:22:27 -05:00
Stepan Rabotkin
7af618e423
feat: add pool tracing to 'MultiTracer' & move it to another package
2024-07-13 17:04:04 +03:00
Stepan Rabotkin
3f270eec7d
feat: add 'MultiTracer' to go doc & cover it
2024-07-13 02:02:22 +03:00
Stepan Rabotkin
8e46d2117c
refac: export 'MultiTracer' fields
2024-07-13 01:40:46 +03:00
Jack Christensen
9530aea47b
Merge pull request #2083 from sodahealth/xml-codec
...
V1 XMLCodec supports encoding + scanning XML column type
2024-07-12 16:49:08 -05:00
nickcruess-soda
a8aaa37363
fix(test): skip CockroachDB since it doesn't support XML
2024-07-12 09:56:59 -05:00
Jack Christensen
67aa0e5a65
Merge pull request #2085 from nolandseigler/rows-snake-case
...
RowToStructByName Snake Case Collision
2024-07-12 09:00:27 -05:00
Jack Christensen
96791c88cd
Merge pull request #2082 from heavycrystal/url-parse-err-fix
...
don't print URL when url.Parse returns an error
2024-07-12 08:52:09 -05:00
nolandseigler
71a8e53574
use normalized equality or strict equality check in rows.go fieldPosByName
2024-07-12 08:50:54 -04:00
Kevin Biju
13e212430d
address review feedback
2024-07-12 18:11:09 +05:30
nolandseigler
b25d092d20
formatting
2024-07-11 23:30:28 -04:00
nolandseigler
7fceb64dee
in rows.go 'fieldPosByName' use boolean to replace '_' and only execution replacements when there are no db tags present
2024-07-11 23:28:21 -04:00
nolandseigler
7a35585143
example test case that demonstrates snake case collision in db tags caused by rows.go 'fieldPosByName'
2024-07-11 22:39:29 -04:00
Stepan Rabotkin
a787630988
feat: implement 'MultiTracer'
2024-07-11 23:41:17 +03:00
nickcruess-soda
37681a4f48
chore: remove unused JSONCodec code, correct typo
2024-07-11 15:18:20 -05:00
nickcruess-soda
c7b9dc0e00
feat: add pgtype.XMLCodec based on pgtype.JSONCodec
2024-07-11 15:17:55 -05:00
Kevin Biju
f007d84675
don't print url when url.Parse returns an error
2024-07-10 22:46:32 +05:30
Jack Christensen
3563a2b048
Merge pull request #2077 from nicois/nicois/pgtype-other-schema-fix
...
Fix bug relating to reuse of types
2024-07-08 17:29:44 -05:00
Nick Farrell
b770252a3b
Fix bug relating to reuse of types
...
When `LoadTypes` is being called, it does not include the
namespace-qualified types in its result. While these namespaces are
visible to `LoadTypes` itself, `RegisterTypes` will not recognise this
form of the types, only allowing them to be used if they are on the
schema path, and referred to without their namespace component.
2024-07-07 11:26:19 +10:00
Jack Christensen
c64fa0f0f2
Document that batched queries should not contain multiple statements
2024-07-03 22:49:02 -05:00
Jack Christensen
dced53f796
Better error message when reading past end of batch
...
https://github.com/jackc/pgx/issues/1801
2024-07-03 22:39:29 -05:00
Jack Christensen
161ce73ec1
Merge pull request #2046 from nicois/nicois/load-types
...
Faster/easier loading of types
2024-07-01 06:52:10 -05:00
Jack Christensen
fa57a20518
Update go.mod to require go 1.21
...
pgx now uses slices package.
2024-07-01 06:48:51 -05:00
Jack Christensen
dd71547340
Merge pull request #2066 from yuki0920/use-slices-contains
...
Fix: use `slices.Contains` according to the TODO comment
2024-07-01 06:47:06 -05:00
Nick Farrell
47977703e1
Load types using a single SQL query
...
When loading even a single type into pgx's type map, multiple SQL
queries are performed in series. Over a slow link, this is not ideal.
Worse, if multiple types are being registered, this is repeated multiple
times.
This commit add LoadTypes, which can retrieve type
mapping information for multiple types in a single SQL call, including
recursive fetching of dependent types.
RegisterTypes performs the second stage of this operation.
2024-07-01 15:34:17 +10:00
yuki0920
a764746906
Fix: use `slices.Contains` according to the TODO comment
...
I used `slices.Contains` according to the TODO comment.
```
// TODO replace by slices.Contains when experimental package will be merged to stdlib
// https://pkg.go.dev/golang.org/x/exp/slices#Contains
```
2024-06-30 07:58:56 +09:00
Jack Christensen
6b9ff972a4
Merge pull request #2061 from yann-soubeyrand/support-sslrootcert-system
...
Add support for sslrootcert=system
2024-06-29 06:32:18 -05:00
Yann Soubeyrand
c407c42692
Add support for sslrootcert=system
2024-06-25 11:15:40 +02:00
Jack Christensen
9907b874c2
Update pgservicefile
...
Fixes panic when parsing invalid file.
2024-06-06 07:12:26 -05:00
Jack Christensen
ec557e87d5
Merge pull request #2035 from exekias/fix-interval
...
Fix interval encoding to allow 0s and avoid extra spaces
2024-05-30 20:13:33 -05:00
Carlos Pérez-Aradros Herce
9f4a264f89
Fix interval encoding to allow 0s and avoid extra spaces
...
Fix a bugs introduced by 01d649b
, also add some tests
2024-05-30 09:48:53 +02:00
Jack Christensen
572d7fff32
Release v5.6.0
2024-05-25 11:35:25 -05:00
Jack Christensen
b4911f1da7
Merge pull request #2019 from jackc/fix-encode-driver-valuer-on-pointer
...
Fix encode driver.Valuer on pointer
2024-05-25 11:20:25 -05:00
Hans-Joachim Kliemeck
24c0a5e8ff
remove keepalive and rely on GOLANG default (since go 1.13 default is 15s)
...
https://www.reddit.com/r/golang/comments/d7v7dn/psa_go_113_introduces_15_sec_server_tcp/
2024-05-21 10:37:13 -05:00
Jack Christensen
9ca9203afb
Move typed nil handling to Map.Encode from anynil
...
The new logic checks for any type of nil at the beginning of Encode and
then either treats it as NULL or calls the driver.Valuer method if
appropriate.
This should preserve the existing nil normalization while restoring the
ability to encode nil driver.Valuer values.
2024-05-18 22:39:28 -05:00
Jack Christensen
79cab4640f
Only use anynil inside of pgtype
2024-05-18 21:06:23 -05:00
Jack Christensen
6ea2d248a3
Remove anynil.NormalizeSlice
...
anynil.Is was already being called in all paths that
anynil.NormalizeSlice was used.
2024-05-18 21:01:34 -05:00