pgx/pgtype
Jack Christensen 88dfc22ae4 Fix simple protocol encoding of json.RawMessage
The underlying type of json.RawMessage is a []byte so to avoid it being
considered binary data we need to handle it specifically. This is done
by registerDefaultPgTypeVariants. In addition, handle json.RawMessage in
the JSONCodec PlanEncode to avoid it being mutated by json.Marshal.

https://github.com/jackc/pgx/issues/1763
2024-03-02 15:12:20 -06:00
..
zeronull zeronull.Timestamptz should use pgtype.Timestamptz 2023-07-22 08:35:32 -05:00
array.go fix error message to print the unexpected rune 2023-12-01 18:23:23 -06:00
array_codec.go Prefer binary format for arrays 2023-02-10 20:21:25 -06:00
array_codec_test.go pgtype array: Fix encoding of vtab \v 2023-06-17 17:15:58 -05:00
array_test.go Make array helpers private 2022-04-16 14:21:40 -05:00
bits.go Fix: pgtype.Bits makes copy of data from read buffer 2024-02-23 17:40:11 -06:00
bits_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
bool.go support different bool string representations 2023-04-27 20:29:41 -05:00
bool_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
box.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
box_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
builtin_wrappers.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
bytea.go Fix: driver.Value representation of bytea should be []byte not string 2022-12-21 17:54:42 -06:00
bytea_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
circle.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
circle_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
composite.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
composite_test.go Fix scanning a table type into a struct 2023-04-20 20:13:37 -05:00
convert.go Remove some now unused pgtype code 2023-07-10 20:23:42 -05:00
date.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
date_test.go Fix text decoding of dates with 5 digit years 2022-11-12 07:01:11 -06:00
doc.go Spelling and grammar fixes 2023-10-07 09:26:23 -05:00
enum_codec.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
enum_codec_test.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
example_child_records_test.go Drastically increase allowed test times for potato CI 2023-07-11 21:16:08 -05:00
example_custom_type_test.go Add child records docs and examples 2022-07-23 10:11:13 -05:00
example_json_test.go Add child records docs and examples 2022-07-23 10:11:13 -05:00
float4.go Fix scan float4 into sql.Scanner 2024-02-23 18:18:03 -06:00
float4_test.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
float8.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
float8_test.go implement json.Marshaler and json.Unmarshaler for Float4, Float8 2023-11-04 10:25:31 -05:00
hstore.go pgtype.Hstore: add a round-trip test for binary and text codecs 2023-06-29 17:25:47 -05:00
hstore_test.go Drastically increase allowed test times for potato CI 2023-07-11 21:16:08 -05:00
inet.go Spelling and grammar fixes 2023-10-07 09:26:23 -05:00
inet_test.go Use netip package for representing inet and cidr types 2022-07-10 14:31:55 -05:00
int.go pgtype Int fix minimum error message. 2022-12-17 09:10:02 -06:00
int.go.erb pgtype Int fix minimum error message. 2022-12-17 09:10:02 -06:00
int_test.go Better number to string handling 2022-04-09 09:09:46 -05:00
int_test.go.erb Better number to string handling 2022-04-09 09:09:46 -05:00
integration_benchmark_test.go Fix broken benchmarks 2023-02-10 20:26:18 -06:00
integration_benchmark_test.go.erb Rename ForEachScannedRow to ForEachRow 2022-07-09 16:47:28 -05:00
integration_benchmark_test_gen.sh Import to pgx main repo in pgtype subdir 2021-12-04 13:07:54 -06:00
interval.go Spelling and grammar fixes 2023-10-07 09:26:23 -05:00
interval_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
json.go Fix simple protocol encoding of json.RawMessage 2024-03-02 15:12:20 -06:00
json_test.go Fix issue with order of json encoding #1805 2023-11-24 19:01:48 -06:00
jsonb.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
jsonb_test.go Fix JSON encoding for pointer to structs implementing json.Marshaler 2023-07-11 20:28:36 -05:00
line.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
line_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
lseg.go Encode text for Lseg includes [ and ] 2022-09-24 10:30:12 -05:00
lseg_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
ltree.go add ltree pgtype support 2024-01-26 09:06:13 -06:00
ltree_test.go add ltree pgtype support 2024-01-26 09:06:13 -06:00
macaddr.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
macaddr_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
multirange.go fix error message to print the unexpected rune 2023-12-01 18:23:23 -06:00
multirange_test.go Skip multirange tests on PG < 14 2022-04-23 16:55:24 -05:00
numeric.go pull out changes into new public function 2023-12-09 11:20:14 -06:00
numeric_test.go pull out changes into new public function 2023-12-09 11:20:14 -06:00
path.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
path_test.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
pgtype.go Fix panic in TryFindUnderlyingTypeScanPlan 2024-02-26 17:51:56 -06:00
pgtype_default.go Fix simple protocol encoding of json.RawMessage 2024-03-02 15:12:20 -06:00
pgtype_test.go Fix simple protocol encoding of json.RawMessage 2024-03-02 15:12:20 -06:00
point.go Make use of strings.Cut 2023-10-04 20:41:55 +03:00
point_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
polygon.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
polygon_test.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
qchar.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
qchar_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
range.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
range_codec.go wrap errors instead of just formatting them 2023-12-01 18:23:23 -06:00
range_codec_test.go Revert use generics for RangeCodec 2022-04-16 10:39:12 -05:00
range_test.go Use bytes.Equal rather than bytes.Compare ==/!= 0 2023-07-08 12:08:05 -05:00
record_codec.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
record_codec_test.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
register_default_pg_types.go Add build tag to skip default PG type registration 2022-08-13 08:09:44 -05:00
register_default_pg_types_disabled.go Add build tag to skip default PG type registration 2022-08-13 08:09:44 -05:00
text.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
text_format_only_codec.go Use TextCodec for aclitem type 2022-01-08 16:24:05 -06:00
text_test.go Remove rune to text conversion 2022-05-12 17:13:49 -05:00
tid.go Make use of strings.Cut 2023-10-04 20:41:55 +03:00
tid_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
time.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
time_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
timestamp.go added MarshalJSON and UnmarshalJSON to timestamp and added their tests (based on timestamptz implementation) 2023-06-12 09:52:49 -05:00
timestamp_test.go added MarshalJSON and UnmarshalJSON to timestamp and added their tests (based on timestamptz implementation) 2023-06-12 09:52:49 -05:00
timestamptz.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
timestamptz_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
uint32.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
uint32_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
uuid.go feat: fast encodeUUID 2024-01-20 20:50:01 -06:00
uuid_test.go Scan binary UUID to string 2022-04-26 08:37:10 -05:00