pgx/pgtype
Evan Jones dc94db6b3d pgtype.Hstore: add a round-trip test for binary and text codecs
This ensures the output of Encode can pass through Scan and produce
the same input. This found two two minor problems with the text
codec. These are not bugs: These situations do not happen when using
pgx with Postgres. However, I think it is worth fixing to ensure the
code is internally consistent.

The problems with the text codec are:

* It did not correctly distinguish between nil and empty. This is not
  a problem with Postgres, since NULL values are marked separately,
  but the binary codec distinguishes between them, so it seems like
  the text codec should as well.
* It did not output spaces between keys. Postgres produces output in
  this format, and the parser now only strictly parses the Postgres
  format. This is not a bug, but seems like a good idea.
2023-06-29 17:25:47 -05:00
..
zeronull Replace interface{} with any 2022-04-09 09:12:55 -05:00
array.go pgtype array: Fix encoding of vtab \v 2023-06-17 17:15:58 -05: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 Replace interface{} with any 2022-04-09 09:12:55 -05:00
bits_test.go Replace interface{} with any 2022-04-09 09:12:55 -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 Add support for single dimensional arrays 2022-12-20 20:12:12 -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 Fix: driver.Value representation of bytea should be []byte not string 2022-12-21 17:54:42 -06: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 Fix test failures 2023-05-20 08:53:23 -05:00
date.go Correct error message 2022-11-12 07:06:54 -06:00
date_test.go Fix text decoding of dates with 5 digit years 2022-11-12 07:01:11 -06:00
doc.go Unregistered OIDs are handled the same as unknown OIDs 2022-12-23 13:14:56 -06: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 Skip some examples on CockroachDB 2022-07-23 10:52:35 -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 Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
float4_test.go Better number to string handling 2022-04-09 09:09:46 -05:00
float8.go feat: add marshalJSON for float8 type 2022-09-24 10:00:40 -05:00
float8_test.go Better number to string handling 2022-04-09 09:09:46 -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 pgtype.Hstore: add a round-trip test for binary and text codecs 2023-06-29 17:25:47 -05:00
inet.go Fix InetCodec.DecodeValue 2022-07-11 08:07: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 Replace interface{} with any 2022-04-09 09:12:55 -05:00
interval_test.go pgtype uses pgxtest 2022-04-02 14:34:19 -05:00
json.go fix: handle null interface for json 2023-03-25 10:22:11 -05:00
json_test.go add tests 2023-03-25 10:22:11 -05:00
jsonb.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
jsonb_test.go add tests 2023-03-25 10:22:11 -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
macaddr.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
macaddr_test.go Replace interface{} with any 2022-04-09 09:12:55 -05:00
multirange.go Build / rewrite / port multirange support 2022-04-23 12:50:18 -05:00
multirange_test.go Skip multirange tests on PG < 14 2022-04-23 16:55:24 -05:00
numeric.go add UnmarshalJSON for pgtype Numeric 2023-01-30 21:33:02 -06:00
numeric_test.go add UnmarshalJSON for pgtype Numeric 2023-01-30 21:33:02 -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 concurrency bug in pgtype.defaultMap (#1650) 2023-06-18 08:23:56 -05:00
pgtype_default.go fix concurrency bug in pgtype.defaultMap (#1650) 2023-06-18 08:23:56 -05:00
pgtype_test.go support different bool string representations 2023-04-27 20:29:41 -05:00
point.go Replace interface{} with any 2022-04-09 09:12:55 -05: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 Make range helpers private 2022-04-23 11:10:04 -05:00
range_codec.go Standardize casing for NULL in error messages 2022-08-22 21:01:18 -05:00
range_codec_test.go Revert use generics for RangeCodec 2022-04-16 10:39:12 -05:00
range_test.go Make range helpers private 2022-04-23 11:10:04 -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 Apply `gofmt -s` 2023-01-24 07:55:00 -06: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 Scan binary UUID to string 2022-04-26 08:37:10 -05:00
uuid_test.go Scan binary UUID to string 2022-04-26 08:37:10 -05:00