diff --git a/c-deps/rocksdb b/c-deps/rocksdb index dc306254a559..c905cbca7b5a 160000 --- a/c-deps/rocksdb +++ b/c-deps/rocksdb @@ -1 +1 @@ -Subproject commit dc306254a55939066488f15b9b48fb50c3ae6b63 +Subproject commit c905cbca7b5ac1ef59046cfa58e146458f499eec diff --git a/pkg/cmd/generate-binary/main.go b/pkg/cmd/generate-binary/main.go index d0c7312f4e16..1d084483ab73 100644 --- a/pkg/cmd/generate-binary/main.go +++ b/pkg/cmd/generate-binary/main.go @@ -91,8 +91,14 @@ func main() { if err != nil { log.Fatalf("binary: %s: %v", sql, err) } + sql = fmt.Sprintf("SELECT pg_typeof(%s)::int", expr) + id, err := pgconnect.Connect(ctx, sql, *postgresAddr, *postgresUser, pgwirebase.FormatText) + if err != nil { + log.Fatalf("oid: %s: %v", sql, err) + } data = append(data, entry{ SQL: expr, + Oid: string(id), Text: text, Binary: binary, }) @@ -109,6 +115,7 @@ func main() { type entry struct { SQL string + Oid string Text []byte Binary []byte } @@ -131,6 +138,7 @@ const outputJSON = `[ {{- if gt $idx 0 }},{{end}} { "SQL": {{.SQL | json}}, + "Oid": {{.Oid}}, "Text": {{printf "%q" .Text}}, "TextAsBinary": {{.Text | binary}}, "Binary": {{.Binary | binary}} @@ -216,6 +224,55 @@ var inputs = map[string][]string{ fmt.Sprint(math.SmallestNonzeroFloat64), }, + "'%s'::float4": { + // The Go binary encoding of NaN differs from Postgres by a 1 at the + // end. Go also uses Inf instead of Infinity (used by Postgres) for text + // float encodings. These deviations are still correct, and it's not worth + // special casing them into the code, so they are commented out here. + //"NaN", + //"Inf", + //"-Inf", + "-000.000", + "-0000021234.2", + "-1.2", + ".0", + ".1", + ".1234", + ".12345", + "3.40282e+38", + "1.4013e-45", + }, + + "'%s'::int2": { + "0", + "1", + "-1", + "-32768", + "32767", + }, + + "'%s'::int4": { + "0", + "1", + "-1", + "-32768", + "32767", + "-2147483648", + "2147483647", + }, + + "'%s'::int8": { + "0", + "1", + "-1", + "-32768", + "32767", + "-2147483648", + "2147483647", + "-9223372036854775808", + "9223372036854775807", + }, + "'%s'::timestamp": { "1999-01-08 04:05:06+00", "1999-01-08 04:05:06+00:00", diff --git a/pkg/sql/pgwire/command_result.go b/pkg/sql/pgwire/command_result.go index ae37c8c06559..14cb2abeeea4 100644 --- a/pkg/sql/pgwire/command_result.go +++ b/pkg/sql/pgwire/command_result.go @@ -77,6 +77,10 @@ type commandResult struct { // case for queries executed through the simple protocol). Otherwise, it needs // to have an entry for every column. formatCodes []pgwirebase.FormatCode + + // oids is a map from result column index to its Oid, similar to formatCodes + // (except oids must always be set). + oids []oid.Oid } func (c *conn) makeCommandResult( @@ -213,7 +217,7 @@ func (r *commandResult) AddRow(ctx context.Context, row tree.Datums) error { } r.rowsAffected++ - r.conn.bufferRow(ctx, row, r.formatCodes, r.conv) + r.conn.bufferRow(ctx, row, r.formatCodes, r.conv, r.oids) _ /* flushed */, err := r.conn.maybeFlush(r.pos) return err } @@ -224,6 +228,10 @@ func (r *commandResult) SetColumns(ctx context.Context, cols sqlbase.ResultColum if r.descOpt == sql.NeedRowDesc { _ /* err */ = r.conn.writeRowDescription(ctx, cols, r.formatCodes, &r.conn.writerState.buf) } + r.oids = make([]oid.Oid, len(cols)) + for i, col := range cols { + r.oids[i] = col.Typ.Oid() + } } // SetInferredTypes is part of the DescribeResult interface. diff --git a/pkg/sql/pgwire/conn.go b/pkg/sql/pgwire/conn.go index 781c8e981772..460509ff2930 100644 --- a/pkg/sql/pgwire/conn.go +++ b/pkg/sql/pgwire/conn.go @@ -915,6 +915,7 @@ func (c *conn) bufferRow( row tree.Datums, formatCodes []pgwirebase.FormatCode, conv sessiondata.DataConversionConfig, + oids []oid.Oid, ) { c.msgBuilder.initMsg(pgwirebase.ServerMsgDataRow) c.msgBuilder.putInt16(int16(len(row))) @@ -927,7 +928,7 @@ func (c *conn) bufferRow( case pgwirebase.FormatText: c.msgBuilder.writeTextDatum(ctx, col, conv) case pgwirebase.FormatBinary: - c.msgBuilder.writeBinaryDatum(ctx, col, conv.Location) + c.msgBuilder.writeBinaryDatum(ctx, col, conv.Location, oids[i]) default: c.msgBuilder.setError(errors.Errorf("unsupported format code %s", fmtCode)) } diff --git a/pkg/sql/pgwire/encoding_test.go b/pkg/sql/pgwire/encoding_test.go index 57fdb4f044fe..c6bf69846a70 100644 --- a/pkg/sql/pgwire/encoding_test.go +++ b/pkg/sql/pgwire/encoding_test.go @@ -34,11 +34,13 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/sessiondata" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/metric" + "github.com/lib/pq/oid" ) type encodingTest struct { SQL string Datum tree.Datum + Oid oid.Oid Text string TextAsBinary []byte Binary []byte @@ -102,6 +104,7 @@ func TestEncodings(t *testing.T) { buf := newWriteBuffer(metric.NewCounter(metric.Metadata{})) verifyLen := func(t *testing.T) []byte { + t.Helper() b := buf.wrapped.Bytes() if len(b) < 4 { t.Fatal("short buffer") @@ -140,7 +143,7 @@ func TestEncodings(t *testing.T) { }) t.Run(pgwirebase.FormatBinary.String(), func(t *testing.T) { buf.reset() - buf.writeBinaryDatum(ctx, d, time.UTC) + buf.writeBinaryDatum(ctx, d, time.UTC, tc.Oid) if buf.err != nil { t.Fatal(buf.err) } @@ -159,14 +162,13 @@ func TestEncodings(t *testing.T) { // Unsupported. t.Skip() } - id := tc.Datum.ResolvedType().Oid() for code, value := range map[pgwirebase.FormatCode][]byte{ pgwirebase.FormatText: tc.TextAsBinary, pgwirebase.FormatBinary: tc.Binary, } { t.Run(code.String(), func(t *testing.T) { - t.Logf("code: %s\nvalue: %q (%[2]s)\noid: %v", code, value, id) - d, err := pgwirebase.DecodeOidDatum(nil, id, code, value) + t.Logf("code: %s\nvalue: %q (%[2]s)\noid: %v", code, value, tc.Oid) + d, err := pgwirebase.DecodeOidDatum(nil, tc.Oid, code, value) if err != nil { t.Fatal(err) } @@ -219,7 +221,7 @@ func BenchmarkEncodings(b *testing.B) { for i := 0; i < b.N; i++ { buf.reset() b.StartTimer() - buf.writeBinaryDatum(ctx, d, time.UTC) + buf.writeBinaryDatum(ctx, d, time.UTC, tc.Oid) b.StopTimer() } }) @@ -232,7 +234,7 @@ func TestEncodingErrorCounts(t *testing.T) { buf := newWriteBuffer(metric.NewCounter(metric.Metadata{})) d, _ := tree.ParseDDecimal("Inf") - buf.writeBinaryDatum(context.Background(), d, nil) + buf.writeBinaryDatum(context.Background(), d, nil, d.ResolvedType().Oid()) if count := telemetry.GetFeatureCounts()["pgwire.#32489.binary_decimal_infinity"]; count != 1 { t.Fatalf("expected 1 encoding error, got %d", count) } diff --git a/pkg/sql/pgwire/pgwirebase/encoding.go b/pkg/sql/pgwire/pgwirebase/encoding.go index 846f73ac8b7a..f9c2915781b3 100644 --- a/pkg/sql/pgwire/pgwirebase/encoding.go +++ b/pkg/sql/pgwire/pgwirebase/encoding.go @@ -531,7 +531,7 @@ func DecodeOidDatum( return nil, err } return tree.ParseDJSON(string(b)) - case oid.T_varbit: + case oid.T_varbit, oid.T_bit: if len(b) < 4 { return nil, errors.Errorf("missing varbit bitlen prefix") } diff --git a/pkg/sql/pgwire/testdata/encodings.json b/pkg/sql/pgwire/testdata/encodings.json index 08736a48bf8e..24666de95836 100644 --- a/pkg/sql/pgwire/testdata/encodings.json +++ b/pkg/sql/pgwire/testdata/encodings.json @@ -1,1374 +1,1813 @@ [ { "SQL": "array[1,NULL]::int8[]", + "Oid": 1016, "Text": "{1,NULL}", "TextAsBinary": [123, 49, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255] }, { "SQL": "array[0.1,NULL]::float8[]", + "Oid": 1022, "Text": "{0.1,NULL}", "TextAsBinary": [123, 48, 46, 49, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 189, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 8, 63, 185, 153, 153, 153, 153, 153, 154, 255, 255, 255, 255] }, { "SQL": "array[1,NULL]::numeric[]", + "Oid": 1231, "Text": "{1,NULL}", "TextAsBinary": [123, 49, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 6, 164, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 255, 255, 255, 255] }, { "SQL": "array['test',NULL]::text[]", + "Oid": 1009, "Text": "{test,NULL}", "TextAsBinary": [123, 116, 101, 115, 116, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 4, 116, 101, 115, 116, 255, 255, 255, 255] }, { "SQL": "array['test',NULL]::name[]", + "Oid": 1003, "Text": "{test,NULL}", "TextAsBinary": [123, 116, 101, 115, 116, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 19, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 4, 116, 101, 115, 116, 255, 255, 255, 255] }, { "SQL": "'1999-01-08'::date", + "Oid": 1082, "Text": "1999-01-08", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56], "Binary": [255, 255, 254, 154] }, { "SQL": "'0009-01-08'::date", + "Oid": 1082, "Text": "0009-01-08", "TextAsBinary": [48, 48, 48, 57, 45, 48, 49, 45, 48, 56], "Binary": [255, 244, 231, 106] }, { "SQL": "'9999-01-08'::date", + "Oid": 1082, "Text": "9999-01-08", "TextAsBinary": [57, 57, 57, 57, 45, 48, 49, 45, 48, 56], "Binary": [0, 44, 148, 110] }, { "SQL": "'1999-12-30'::date", + "Oid": 1082, "Text": "1999-12-30", "TextAsBinary": [49, 57, 57, 57, 45, 49, 50, 45, 51, 48], "Binary": [255, 255, 255, 254] }, { "SQL": "'1996-02-29'::date", + "Oid": 1082, "Text": "1996-02-29", "TextAsBinary": [49, 57, 57, 54, 45, 48, 50, 45, 50, 57], "Binary": [255, 255, 250, 134] }, { "SQL": "'0001-01-01'::date", + "Oid": 1082, "Text": "0001-01-01", "TextAsBinary": [48, 48, 48, 49, 45, 48, 49, 45, 48, 49], "Binary": [255, 244, 219, 249] }, { "SQL": "'0001-01-01 BC'::date", + "Oid": 1082, "Text": "0001-01-01 BC", "TextAsBinary": [48, 48, 48, 49, 45, 48, 49, 45, 48, 49, 32, 66, 67], "Binary": [255, 244, 218, 139] }, { "SQL": "'3592-12-31 BC'::date", + "Oid": 1082, "Text": "3592-12-31 BC", "TextAsBinary": [51, 53, 57, 50, 45, 49, 50, 45, 51, 49, 32, 66, 67], "Binary": [255, 224, 216, 150] }, { "SQL": "'NaN'::decimal", + "Oid": 1700, "Text": "NaN", "TextAsBinary": [78, 97, 78], "Binary": [0, 0, 0, 0, 192, 0, 0, 0] }, { "SQL": "'-000.000'::decimal", + "Oid": 1700, "Text": "0.000", "TextAsBinary": [48, 46, 48, 48, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 3] }, { "SQL": "'-0000021234.23246346000000'::decimal", + "Oid": 1700, "Text": "-21234.23246346000000", "TextAsBinary": [45, 50, 49, 50, 51, 52, 46, 50, 51, 50, 52, 54, 51, 52, 54, 48, 48, 48, 48, 48, 48], "Binary": [0, 4, 0, 1, 64, 0, 0, 14, 0, 2, 4, 210, 9, 20, 24, 202] }, { "SQL": "'-1.2'::decimal", + "Oid": 1700, "Text": "-1.2", "TextAsBinary": [45, 49, 46, 50], "Binary": [0, 2, 0, 0, 64, 0, 0, 1, 0, 1, 7, 208] }, { "SQL": "'.0'::decimal", + "Oid": 1700, "Text": "0.0", "TextAsBinary": [48, 46, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'.1'::decimal", + "Oid": 1700, "Text": "0.1", "TextAsBinary": [48, 46, 49], "Binary": [0, 1, 255, 255, 0, 0, 0, 1, 3, 232] }, { "SQL": "'.1234'::decimal", + "Oid": 1700, "Text": "0.1234", "TextAsBinary": [48, 46, 49, 50, 51, 52], "Binary": [0, 1, 255, 255, 0, 0, 0, 4, 4, 210] }, { "SQL": "'.12345'::decimal", + "Oid": 1700, "Text": "0.12345", "TextAsBinary": [48, 46, 49, 50, 51, 52, 53], "Binary": [0, 2, 255, 255, 0, 0, 0, 5, 4, 210, 19, 136] }, { "SQL": "'0'::decimal", + "Oid": 1700, "Text": "0", "TextAsBinary": [48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'0.'::decimal", + "Oid": 1700, "Text": "0", "TextAsBinary": [48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'0.0'::decimal", + "Oid": 1700, "Text": "0.0", "TextAsBinary": [48, 46, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'0.000006'::decimal", + "Oid": 1700, "Text": "0.000006", "TextAsBinary": [48, 46, 48, 48, 48, 48, 48, 54], "Binary": [0, 1, 255, 254, 0, 0, 0, 6, 2, 88] }, { "SQL": "'0.0000124000'::decimal", + "Oid": 1700, "Text": "0.0000124000", "TextAsBinary": [48, 46, 48, 48, 48, 48, 49, 50, 52, 48, 48, 48], "Binary": [0, 1, 255, 254, 0, 0, 0, 10, 4, 216] }, { "SQL": "'0.00005'::decimal", + "Oid": 1700, "Text": "0.00005", "TextAsBinary": [48, 46, 48, 48, 48, 48, 53], "Binary": [0, 1, 255, 254, 0, 0, 0, 5, 19, 136] }, { "SQL": "'0.0004'::decimal", + "Oid": 1700, "Text": "0.0004", "TextAsBinary": [48, 46, 48, 48, 48, 52], "Binary": [0, 1, 255, 255, 0, 0, 0, 4, 0, 4] }, { "SQL": "'0.003'::decimal", + "Oid": 1700, "Text": "0.003", "TextAsBinary": [48, 46, 48, 48, 51], "Binary": [0, 1, 255, 255, 0, 0, 0, 3, 0, 30] }, { "SQL": "'0.00300'::decimal", + "Oid": 1700, "Text": "0.00300", "TextAsBinary": [48, 46, 48, 48, 51, 48, 48], "Binary": [0, 1, 255, 255, 0, 0, 0, 5, 0, 30] }, { "SQL": "'0.02'::decimal", + "Oid": 1700, "Text": "0.02", "TextAsBinary": [48, 46, 48, 50], "Binary": [0, 1, 255, 255, 0, 0, 0, 2, 0, 200] }, { "SQL": "'0.038665987681445668'::decimal", + "Oid": 1700, "Text": "0.038665987681445668", "TextAsBinary": [48, 46, 48, 51, 56, 54, 54, 53, 57, 56, 55, 54, 56, 49, 52, 52, 53, 54, 54, 56], "Binary": [0, 5, 255, 255, 0, 0, 0, 18, 1, 130, 25, 198, 30, 1, 17, 104, 26, 144] }, { "SQL": "'0.1'::decimal", + "Oid": 1700, "Text": "0.1", "TextAsBinary": [48, 46, 49], "Binary": [0, 1, 255, 255, 0, 0, 0, 1, 3, 232] }, { "SQL": "'00.00'::decimal", + "Oid": 1700, "Text": "0.00", "TextAsBinary": [48, 46, 48, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 2] }, { "SQL": "'1'::decimal", + "Oid": 1700, "Text": "1", "TextAsBinary": [49], "Binary": [0, 1, 0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'1.000000000000006'::decimal", + "Oid": 1700, "Text": "1.000000000000006", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 54], "Binary": [0, 5, 0, 0, 0, 0, 0, 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, 60] }, { "SQL": "'1.00000000000005'::decimal", + "Oid": 1700, "Text": "1.00000000000005", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53], "Binary": [0, 5, 0, 0, 0, 0, 0, 14, 0, 1, 0, 0, 0, 0, 0, 0, 1, 244] }, { "SQL": "'1.0000000000004'::decimal", + "Oid": 1700, "Text": "1.0000000000004", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 52], "Binary": [0, 5, 0, 0, 0, 0, 0, 13, 0, 1, 0, 0, 0, 0, 0, 0, 15, 160] }, { "SQL": "'1.000000000003'::decimal", + "Oid": 1700, "Text": "1.000000000003", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 51], "Binary": [0, 4, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 3] }, { "SQL": "'1.00000000002'::decimal", + "Oid": 1700, "Text": "1.00000000002", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50], "Binary": [0, 4, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 20] }, { "SQL": "'1.0000000001'::decimal", + "Oid": 1700, "Text": "1.0000000001", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49], "Binary": [0, 4, 0, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 100] }, { "SQL": "'1.000000009'::decimal", + "Oid": 1700, "Text": "1.000000009", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 57], "Binary": [0, 4, 0, 0, 0, 0, 0, 9, 0, 1, 0, 0, 0, 0, 35, 40] }, { "SQL": "'1.00000008'::decimal", + "Oid": 1700, "Text": "1.00000008", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 48, 56], "Binary": [0, 3, 0, 0, 0, 0, 0, 8, 0, 1, 0, 0, 0, 8] }, { "SQL": "'1.0000007'::decimal", + "Oid": 1700, "Text": "1.0000007", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 48, 55], "Binary": [0, 3, 0, 0, 0, 0, 0, 7, 0, 1, 0, 0, 0, 70] }, { "SQL": "'1.000006'::decimal", + "Oid": 1700, "Text": "1.000006", "TextAsBinary": [49, 46, 48, 48, 48, 48, 48, 54], "Binary": [0, 3, 0, 0, 0, 0, 0, 6, 0, 1, 0, 0, 2, 88] }, { "SQL": "'1.00005'::decimal", + "Oid": 1700, "Text": "1.00005", "TextAsBinary": [49, 46, 48, 48, 48, 48, 53], "Binary": [0, 3, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 19, 136] }, { "SQL": "'1.0004'::decimal", + "Oid": 1700, "Text": "1.0004", "TextAsBinary": [49, 46, 48, 48, 48, 52], "Binary": [0, 2, 0, 0, 0, 0, 0, 4, 0, 1, 0, 4] }, { "SQL": "'1.003'::decimal", + "Oid": 1700, "Text": "1.003", "TextAsBinary": [49, 46, 48, 48, 51], "Binary": [0, 2, 0, 0, 0, 0, 0, 3, 0, 1, 0, 30] }, { "SQL": "'1.02'::decimal", + "Oid": 1700, "Text": "1.02", "TextAsBinary": [49, 46, 48, 50], "Binary": [0, 2, 0, 0, 0, 0, 0, 2, 0, 1, 0, 200] }, { "SQL": "'1.1'::decimal", + "Oid": 1700, "Text": "1.1", "TextAsBinary": [49, 46, 49], "Binary": [0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 3, 232] }, { "SQL": "'10000.000006'::decimal", + "Oid": 1700, "Text": "10000.000006", "TextAsBinary": [49, 48, 48, 48, 48, 46, 48, 48, 48, 48, 48, 54], "Binary": [0, 4, 0, 1, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 2, 88] }, { "SQL": "'10000.00005'::decimal", + "Oid": 1700, "Text": "10000.00005", "TextAsBinary": [49, 48, 48, 48, 48, 46, 48, 48, 48, 48, 53], "Binary": [0, 4, 0, 1, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 19, 136] }, { "SQL": "'10000.0004'::decimal", + "Oid": 1700, "Text": "10000.0004", "TextAsBinary": [49, 48, 48, 48, 48, 46, 48, 48, 48, 52], "Binary": [0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 0, 0, 0, 4] }, { "SQL": "'10000.003'::decimal", + "Oid": 1700, "Text": "10000.003", "TextAsBinary": [49, 48, 48, 48, 48, 46, 48, 48, 51], "Binary": [0, 3, 0, 1, 0, 0, 0, 3, 0, 1, 0, 0, 0, 30] }, { "SQL": "'10000.02'::decimal", + "Oid": 1700, "Text": "10000.02", "TextAsBinary": [49, 48, 48, 48, 48, 46, 48, 50], "Binary": [0, 3, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 200] }, { "SQL": "'10000.1'::decimal", + "Oid": 1700, "Text": "10000.1", "TextAsBinary": [49, 48, 48, 48, 48, 46, 49], "Binary": [0, 3, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 3, 232] }, { "SQL": "'1000000'::decimal", + "Oid": 1700, "Text": "1000000", "TextAsBinary": [49, 48, 48, 48, 48, 48, 48], "Binary": [0, 1, 0, 1, 0, 0, 0, 0, 0, 100] }, { "SQL": "'123'::decimal", + "Oid": 1700, "Text": "123", "TextAsBinary": [49, 50, 51], "Binary": [0, 1, 0, 0, 0, 0, 0, 0, 0, 123] }, { "SQL": "'12345'::decimal", + "Oid": 1700, "Text": "12345", "TextAsBinary": [49, 50, 51, 52, 53], "Binary": [0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 9, 41] }, { "SQL": "'12345.1'::decimal", + "Oid": 1700, "Text": "12345.1", "TextAsBinary": [49, 50, 51, 52, 53, 46, 49], "Binary": [0, 3, 0, 1, 0, 0, 0, 1, 0, 1, 9, 41, 3, 232] }, { "SQL": "'12345.1234'::decimal", + "Oid": 1700, "Text": "12345.1234", "TextAsBinary": [49, 50, 51, 52, 53, 46, 49, 50, 51, 52], "Binary": [0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 9, 41, 4, 210] }, { "SQL": "'12345.12345'::decimal", + "Oid": 1700, "Text": "12345.12345", "TextAsBinary": [49, 50, 51, 52, 53, 46, 49, 50, 51, 52, 53], "Binary": [0, 4, 0, 1, 0, 0, 0, 5, 0, 1, 9, 41, 4, 210, 19, 136] }, { "SQL": "'2.2289971159100284'::decimal", + "Oid": 1700, "Text": "2.2289971159100284", "TextAsBinary": [50, 46, 50, 50, 56, 57, 57, 55, 49, 49, 53, 57, 49, 48, 48, 50, 56, 52], "Binary": [0, 5, 0, 0, 0, 0, 0, 16, 0, 2, 8, 241, 37, 239, 23, 22, 1, 28] }, { "SQL": "'3409589268520956934250.234098732045120934701239846'::decimal", + "Oid": 1700, "Text": "3409589268520956934250.234098732045120934701239846", "TextAsBinary": [51, 52, 48, 57, 53, 56, 57, 50, 54, 56, 53, 50, 48, 57, 53, 54, 57, 51, 52, 50, 53, 48, 46, 50, 51, 52, 48, 57, 56, 55, 51, 50, 48, 52, 53, 49, 50, 48, 57, 51, 52, 55, 48, 49, 50, 51, 57, 56, 52, 54], "Binary": [0, 13, 0, 5, 0, 0, 0, 27, 0, 34, 3, 190, 36, 52, 20, 89, 22, 61, 16, 154, 9, 36, 38, 145, 7, 253, 4, 185, 13, 142, 4, 215, 33, 12] }, { "SQL": "'42'::decimal", + "Oid": 1700, "Text": "42", "TextAsBinary": [52, 50], "Binary": [0, 1, 0, 0, 0, 0, 0, 0, 0, 42] }, { "SQL": "'{-000.000,-0000021234.23246346000000,-1.2,.0,.1,.1234}'::decimal[]", + "Oid": 1231, "Text": "{0.000,-21234.23246346000000,-1.2,0.0,0.1,0.1234}", "TextAsBinary": [123, 48, 46, 48, 48, 48, 44, 45, 50, 49, 50, 51, 52, 46, 50, 51, 50, 52, 54, 51, 52, 54, 48, 48, 48, 48, 48, 48, 44, 45, 49, 46, 50, 44, 48, 46, 48, 44, 48, 46, 49, 44, 48, 46, 49, 50, 51, 52, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 16, 0, 4, 0, 1, 64, 0, 0, 14, 0, 2, 4, 210, 9, 20, 24, 202, 0, 0, 0, 12, 0, 2, 0, 0, 64, 0, 0, 1, 0, 1, 7, 208, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 1, 3, 232, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 4, 4, 210] }, { "SQL": "'{.12345,0,0.,0.0,0.000006}'::decimal[]", + "Oid": 1231, "Text": "{0.12345,0,0,0.0,0.000006}", "TextAsBinary": [123, 48, 46, 49, 50, 51, 52, 53, 44, 48, 44, 48, 44, 48, 46, 48, 44, 48, 46, 48, 48, 48, 48, 48, 54, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 12, 0, 2, 255, 255, 0, 0, 0, 5, 4, 210, 19, 136, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 10, 0, 1, 255, 254, 0, 0, 0, 6, 2, 88] }, { "SQL": "'{0.0000124000,0.00005,0.0004,0.003,0.00300,0.02,0.038665987681445668}'::decimal[]", + "Oid": 1231, "Text": "{0.0000124000,0.00005,0.0004,0.003,0.00300,0.02,0.038665987681445668}", "TextAsBinary": [123, 48, 46, 48, 48, 48, 48, 49, 50, 52, 48, 48, 48, 44, 48, 46, 48, 48, 48, 48, 53, 44, 48, 46, 48, 48, 48, 52, 44, 48, 46, 48, 48, 51, 44, 48, 46, 48, 48, 51, 48, 48, 44, 48, 46, 48, 50, 44, 48, 46, 48, 51, 56, 54, 54, 53, 57, 56, 55, 54, 56, 49, 52, 52, 53, 54, 54, 56, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 10, 0, 1, 255, 254, 0, 0, 0, 10, 4, 216, 0, 0, 0, 10, 0, 1, 255, 254, 0, 0, 0, 5, 19, 136, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 4, 0, 4, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 3, 0, 30, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 5, 0, 30, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 2, 0, 200, 0, 0, 0, 18, 0, 5, 255, 255, 0, 0, 0, 18, 1, 130, 25, 198, 30, 1, 17, 104, 26, 144] }, { "SQL": "'{0.1,00.00,1}'::decimal[]", + "Oid": 1231, "Text": "{0.1,0.00,1}", "TextAsBinary": [123, 48, 46, 49, 44, 48, 46, 48, 48, 44, 49, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 10, 0, 1, 255, 255, 0, 0, 0, 1, 3, 232, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'{1.000000000000006,1.00000000000005,1.0000000000004,1.000000000003,1.00000000002,1.0000000001,1.000000009,1.00000008,1.0000007,1.000006,1.00005,1.0004,1.003,1.02,1.1}'::decimal[]", + "Oid": 1231, "Text": "{1.000000000000006,1.00000000000005,1.0000000000004,1.000000000003,1.00000000002,1.0000000001,1.000000009,1.00000008,1.0000007,1.000006,1.00005,1.0004,1.003,1.02,1.1}", "TextAsBinary": [123, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 54, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 52, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 51, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 48, 57, 44, 49, 46, 48, 48, 48, 48, 48, 48, 48, 56, 44, 49, 46, 48, 48, 48, 48, 48, 48, 55, 44, 49, 46, 48, 48, 48, 48, 48, 54, 44, 49, 46, 48, 48, 48, 48, 53, 44, 49, 46, 48, 48, 48, 52, 44, 49, 46, 48, 48, 51, 44, 49, 46, 48, 50, 44, 49, 46, 49, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 15, 0, 0, 0, 1, 0, 0, 0, 18, 0, 5, 0, 0, 0, 0, 0, 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 18, 0, 5, 0, 0, 0, 0, 0, 14, 0, 1, 0, 0, 0, 0, 0, 0, 1, 244, 0, 0, 0, 18, 0, 5, 0, 0, 0, 0, 0, 13, 0, 1, 0, 0, 0, 0, 0, 0, 15, 160, 0, 0, 0, 16, 0, 4, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 16, 0, 4, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 20, 0, 0, 0, 16, 0, 4, 0, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 100, 0, 0, 0, 16, 0, 4, 0, 0, 0, 0, 0, 9, 0, 1, 0, 0, 0, 0, 35, 40, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, 8, 0, 1, 0, 0, 0, 8, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, 7, 0, 1, 0, 0, 0, 70, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, 6, 0, 1, 0, 0, 2, 88, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 19, 136, 0, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, 4, 0, 1, 0, 4, 0, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, 3, 0, 1, 0, 30, 0, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, 2, 0, 1, 0, 200, 0, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 3, 232] }, { "SQL": "'{10000.000006}'::decimal[]", + "Oid": 1231, "Text": "{10000.000006}", "TextAsBinary": [123, 49, 48, 48, 48, 48, 46, 48, 48, 48, 48, 48, 54, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 0, 4, 0, 1, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 2, 88] }, { "SQL": "'{10000.00005}'::decimal[]", + "Oid": 1231, "Text": "{10000.00005}", "TextAsBinary": [123, 49, 48, 48, 48, 48, 46, 48, 48, 48, 48, 53, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 0, 4, 0, 1, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 19, 136] }, { "SQL": "'{10000.0004}'::decimal[]", + "Oid": 1231, "Text": "{10000.0004}", "TextAsBinary": [123, 49, 48, 48, 48, 48, 46, 48, 48, 48, 52, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 0, 0, 0, 4] }, { "SQL": "'{10000.003,10000.02,10000.1,1000000,123}'::decimal[]", + "Oid": 1231, "Text": "{10000.003,10000.02,10000.1,1000000,123}", "TextAsBinary": [123, 49, 48, 48, 48, 48, 46, 48, 48, 51, 44, 49, 48, 48, 48, 48, 46, 48, 50, 44, 49, 48, 48, 48, 48, 46, 49, 44, 49, 48, 48, 48, 48, 48, 48, 44, 49, 50, 51, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 3, 0, 1, 0, 0, 0, 30, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 200, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 3, 232, 0, 0, 0, 10, 0, 1, 0, 1, 0, 0, 0, 0, 0, 100, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 123] }, { "SQL": "'{12345,12345.1,12345.1234,12345.12345}'::decimal[]", + "Oid": 1231, "Text": "{12345,12345.1,12345.1234,12345.12345}", "TextAsBinary": [123, 49, 50, 51, 52, 53, 44, 49, 50, 51, 52, 53, 46, 49, 44, 49, 50, 51, 52, 53, 46, 49, 50, 51, 52, 44, 49, 50, 51, 52, 53, 46, 49, 50, 51, 52, 53, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 12, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 9, 41, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 1, 0, 1, 9, 41, 3, 232, 0, 0, 0, 14, 0, 3, 0, 1, 0, 0, 0, 4, 0, 1, 9, 41, 4, 210, 0, 0, 0, 16, 0, 4, 0, 1, 0, 0, 0, 5, 0, 1, 9, 41, 4, 210, 19, 136] }, { "SQL": "'{2.2289971159100284,3409589268520956934250.234098732045120934701239846,42}'::decimal[]", + "Oid": 1231, "Text": "{2.2289971159100284,3409589268520956934250.234098732045120934701239846,42}", "TextAsBinary": [123, 50, 46, 50, 50, 56, 57, 57, 55, 49, 49, 53, 57, 49, 48, 48, 50, 56, 52, 44, 51, 52, 48, 57, 53, 56, 57, 50, 54, 56, 53, 50, 48, 57, 53, 54, 57, 51, 52, 50, 53, 48, 46, 50, 51, 52, 48, 57, 56, 55, 51, 50, 48, 52, 53, 49, 50, 48, 57, 51, 52, 55, 48, 49, 50, 51, 57, 56, 52, 54, 44, 52, 50, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 6, 164, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 18, 0, 5, 0, 0, 0, 0, 0, 16, 0, 2, 8, 241, 37, 239, 23, 22, 1, 28, 0, 0, 0, 34, 0, 13, 0, 5, 0, 0, 0, 27, 0, 34, 3, 190, 36, 52, 20, 89, 22, 61, 16, 154, 9, 36, 38, 145, 7, 253, 4, 185, 13, 142, 4, 215, 33, 12, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 42] }, + { + "SQL": "'-000.000'::float4", + "Oid": 700, + "Text": "-0", + "TextAsBinary": [45, 48], + "Binary": [128, 0, 0, 0] + }, + { + "SQL": "'-0000021234.2'::float4", + "Oid": 700, + "Text": "-21234.2", + "TextAsBinary": [45, 50, 49, 50, 51, 52, 46, 50], + "Binary": [198, 165, 228, 102] + }, + { + "SQL": "'-1.2'::float4", + "Oid": 700, + "Text": "-1.2", + "TextAsBinary": [45, 49, 46, 50], + "Binary": [191, 153, 153, 154] + }, + { + "SQL": "'.0'::float4", + "Oid": 700, + "Text": "0", + "TextAsBinary": [48], + "Binary": [0, 0, 0, 0] + }, + { + "SQL": "'.1'::float4", + "Oid": 700, + "Text": "0.1", + "TextAsBinary": [48, 46, 49], + "Binary": [61, 204, 204, 205] + }, + { + "SQL": "'.1234'::float4", + "Oid": 700, + "Text": "0.1234", + "TextAsBinary": [48, 46, 49, 50, 51, 52], + "Binary": [61, 252, 185, 36] + }, + { + "SQL": "'.12345'::float4", + "Oid": 700, + "Text": "0.12345", + "TextAsBinary": [48, 46, 49, 50, 51, 52, 53], + "Binary": [61, 252, 211, 91] + }, + { + "SQL": "'3.40282e+38'::float4", + "Oid": 700, + "Text": "3.40282e+38", + "TextAsBinary": [51, 46, 52, 48, 50, 56, 50, 101, 43, 51, 56], + "Binary": [127, 127, 255, 238] + }, + { + "SQL": "'1.4013e-45'::float4", + "Oid": 700, + "Text": "1.4013e-45", + "TextAsBinary": [49, 46, 52, 48, 49, 51, 101, 45, 52, 53], + "Binary": [0, 0, 0, 1] + }, { "SQL": "'-000.000'::float8", + "Oid": 701, "Text": "-0", "TextAsBinary": [45, 48], "Binary": [128, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-0000021234.23246346000000'::float8", + "Oid": 701, "Text": "-21234.23246346", "TextAsBinary": [45, 50, 49, 50, 51, 52, 46, 50, 51, 50, 52, 54, 51, 52, 54], "Binary": [192, 212, 188, 142, 224, 174, 107, 142] }, { "SQL": "'-1.2'::float8", + "Oid": 701, "Text": "-1.2", "TextAsBinary": [45, 49, 46, 50], "Binary": [191, 243, 51, 51, 51, 51, 51, 51] }, { "SQL": "'.0'::float8", + "Oid": 701, "Text": "0", "TextAsBinary": [48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'.1'::float8", + "Oid": 701, "Text": "0.1", "TextAsBinary": [48, 46, 49], "Binary": [63, 185, 153, 153, 153, 153, 153, 154] }, { "SQL": "'.1234'::float8", + "Oid": 701, "Text": "0.1234", "TextAsBinary": [48, 46, 49, 50, 51, 52], "Binary": [63, 191, 151, 36, 116, 83, 142, 243] }, { "SQL": "'.12345'::float8", + "Oid": 701, "Text": "0.12345", "TextAsBinary": [48, 46, 49, 50, 51, 52, 53], "Binary": [63, 191, 154, 107, 80, 176, 242, 124] }, { "SQL": "'3.4028234663852886e+38'::float8", + "Oid": 701, "Text": "3.40282346638529e+38", "TextAsBinary": [51, 46, 52, 48, 50, 56, 50, 51, 52, 54, 54, 51, 56, 53, 50, 57, 101, 43, 51, 56], "Binary": [71, 239, 255, 255, 224, 0, 0, 0] }, { "SQL": "'1.401298464324817e-45'::float8", + "Oid": 701, "Text": "1.40129846432482e-45", "TextAsBinary": [49, 46, 52, 48, 49, 50, 57, 56, 52, 54, 52, 51, 50, 52, 56, 50, 101, 45, 52, 53], "Binary": [54, 160, 0, 0, 0, 0, 0, 0] }, { "SQL": "'1.7976931348623157e+308'::float8", + "Oid": 701, "Text": "1.79769313486232e+308", "TextAsBinary": [49, 46, 55, 57, 55, 54, 57, 51, 49, 51, 52, 56, 54, 50, 51, 50, 101, 43, 51, 48, 56], "Binary": [127, 239, 255, 255, 255, 255, 255, 255] }, { "SQL": "'5e-324'::float8", + "Oid": 701, "Text": "4.94065645841247e-324", "TextAsBinary": [52, 46, 57, 52, 48, 54, 53, 54, 52, 53, 56, 52, 49, 50, 52, 55, 101, 45, 51, 50, 52], "Binary": [0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'0.0.0.0'::inet", + "Oid": 869, "Text": "0.0.0.0", "TextAsBinary": [48, 46, 48, 46, 48, 46, 48], "Binary": [2, 32, 0, 4, 0, 0, 0, 0] }, { "SQL": "'0.0.0.0/20'::inet", + "Oid": 869, "Text": "0.0.0.0/20", "TextAsBinary": [48, 46, 48, 46, 48, 46, 48, 47, 50, 48], "Binary": [2, 20, 0, 4, 0, 0, 0, 0] }, { "SQL": "'0.0.0.0/0'::inet", + "Oid": 869, "Text": "0.0.0.0/0", "TextAsBinary": [48, 46, 48, 46, 48, 46, 48, 47, 48], "Binary": [2, 0, 0, 4, 0, 0, 0, 0] }, { "SQL": "'255.255.255.255'::inet", + "Oid": 869, "Text": "255.255.255.255", "TextAsBinary": [50, 53, 53, 46, 50, 53, 53, 46, 50, 53, 53, 46, 50, 53, 53], "Binary": [2, 32, 0, 4, 255, 255, 255, 255] }, { "SQL": "'255.255.255.255/10'::inet", + "Oid": 869, "Text": "255.255.255.255/10", "TextAsBinary": [50, 53, 53, 46, 50, 53, 53, 46, 50, 53, 53, 46, 50, 53, 53, 47, 49, 48], "Binary": [2, 10, 0, 4, 255, 255, 255, 255] }, { "SQL": "'::0/0'::inet", + "Oid": 869, "Text": "::/0", "TextAsBinary": [58, 58, 47, 48], "Binary": [3, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'::0/64'::inet", + "Oid": 869, "Text": "::/64", "TextAsBinary": [58, 58, 47, 54, 52], "Binary": [3, 64, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'::0'::inet", + "Oid": 869, "Text": "::", "TextAsBinary": [58, 58], "Binary": [3, 128, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'::inet", + "Oid": 869, "Text": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "TextAsBinary": [102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102], "Binary": [3, 128, 0, 16, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] }, { "SQL": "'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/0'::inet", + "Oid": 869, "Text": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/0", "TextAsBinary": [102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 47, 48], "Binary": [3, 0, 0, 16, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] }, { "SQL": "'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/10'::inet", + "Oid": 869, "Text": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff/10", "TextAsBinary": [102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 58, 102, 102, 102, 102, 47, 49, 48], "Binary": [3, 10, 0, 16, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255] }, { "SQL": "'0.0.0.1'::inet", + "Oid": 869, "Text": "0.0.0.1", "TextAsBinary": [48, 46, 48, 46, 48, 46, 49], "Binary": [2, 32, 0, 4, 0, 0, 0, 1] }, { "SQL": "'111::fff/120'::inet", + "Oid": 869, "Text": "111::fff/120", "TextAsBinary": [49, 49, 49, 58, 58, 102, 102, 102, 47, 49, 50, 48], "Binary": [3, 120, 0, 16, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 255] }, { "SQL": "'127.0.0.1/10'::inet", + "Oid": 869, "Text": "127.0.0.1/10", "TextAsBinary": [49, 50, 55, 46, 48, 46, 48, 46, 49, 47, 49, 48], "Binary": [2, 10, 0, 4, 127, 0, 0, 1] }, { "SQL": "'192.168.1.2'::inet", + "Oid": 869, "Text": "192.168.1.2", "TextAsBinary": [49, 57, 50, 46, 49, 54, 56, 46, 49, 46, 50], "Binary": [2, 32, 0, 4, 192, 168, 1, 2] }, { "SQL": "'192.168.1.2/16'::inet", + "Oid": 869, "Text": "192.168.1.2/16", "TextAsBinary": [49, 57, 50, 46, 49, 54, 56, 46, 49, 46, 50, 47, 49, 54], "Binary": [2, 16, 0, 4, 192, 168, 1, 2] }, { "SQL": "'192.168.1.2/10'::inet", + "Oid": 869, "Text": "192.168.1.2/10", "TextAsBinary": [49, 57, 50, 46, 49, 54, 56, 46, 49, 46, 50, 47, 49, 48], "Binary": [2, 10, 0, 4, 192, 168, 1, 2] }, { "SQL": "'2001:4f8:3:ba::/64'::inet", + "Oid": 869, "Text": "2001:4f8:3:ba::/64", "TextAsBinary": [50, 48, 48, 49, 58, 52, 102, 56, 58, 51, 58, 98, 97, 58, 58, 47, 54, 52], "Binary": [3, 64, 0, 16, 32, 1, 4, 248, 0, 3, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'2001:4f8:3:ba:2e0:81ff:fe22:d1f1/128'::inet", + "Oid": 869, "Text": "2001:4f8:3:ba:2e0:81ff:fe22:d1f1", "TextAsBinary": [50, 48, 48, 49, 58, 52, 102, 56, 58, 51, 58, 98, 97, 58, 50, 101, 48, 58, 56, 49, 102, 102, 58, 102, 101, 50, 50, 58, 100, 49, 102, 49], "Binary": [3, 128, 0, 16, 32, 1, 4, 248, 0, 3, 0, 186, 2, 224, 129, 255, 254, 34, 209, 241] }, { "SQL": "'::ffff:1.2.3.1/120'::inet", + "Oid": 869, "Text": "::ffff:1.2.3.1/120", "TextAsBinary": [58, 58, 102, 102, 102, 102, 58, 49, 46, 50, 46, 51, 46, 49, 47, 49, 50, 48], "Binary": [3, 120, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 1, 2, 3, 1] }, { "SQL": "'::ffff:1.2.3.1/128'::inet", + "Oid": 869, "Text": "::ffff:1.2.3.1", "TextAsBinary": [58, 58, 102, 102, 102, 102, 58, 49, 46, 50, 46, 51, 46, 49], "Binary": [3, 128, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 1, 2, 3, 1] }, { "SQL": "'::ffff:1.2.3.1/120'::inet", + "Oid": 869, "Text": "::ffff:1.2.3.1/120", "TextAsBinary": [58, 58, 102, 102, 102, 102, 58, 49, 46, 50, 46, 51, 46, 49, 47, 49, 50, 48], "Binary": [3, 120, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 1, 2, 3, 1] }, { "SQL": "'::ffff:1.2.3.1/20'::inet", + "Oid": 869, "Text": "::ffff:1.2.3.1/20", "TextAsBinary": [58, 58, 102, 102, 102, 102, 58, 49, 46, 50, 46, 51, 46, 49, 47, 50, 48], "Binary": [3, 20, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 1, 2, 3, 1] }, { "SQL": "'::1'::inet", + "Oid": 869, "Text": "::1", "TextAsBinary": [58, 58, 49], "Binary": [3, 128, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'192/10'::inet", + "Oid": 869, "Text": "192.0.0.0/10", "TextAsBinary": [49, 57, 50, 46, 48, 46, 48, 46, 48, 47, 49, 48], "Binary": [2, 10, 0, 4, 192, 0, 0, 0] }, { "SQL": "'192.168/23'::inet", + "Oid": 869, "Text": "192.168.0.0/23", "TextAsBinary": [49, 57, 50, 46, 49, 54, 56, 46, 48, 46, 48, 47, 50, 51], "Binary": [2, 23, 0, 4, 192, 168, 0, 0] }, { "SQL": "'192.168./10'::inet", + "Oid": 869, "Text": "192.168.0.0/10", "TextAsBinary": [49, 57, 50, 46, 49, 54, 56, 46, 48, 46, 48, 47, 49, 48], "Binary": [2, 10, 0, 4, 192, 168, 0, 0] }, + { + "SQL": "'0'::int2", + "Oid": 21, + "Text": "0", + "TextAsBinary": [48], + "Binary": [0, 0] + }, + { + "SQL": "'1'::int2", + "Oid": 21, + "Text": "1", + "TextAsBinary": [49], + "Binary": [0, 1] + }, + { + "SQL": "'-1'::int2", + "Oid": 21, + "Text": "-1", + "TextAsBinary": [45, 49], + "Binary": [255, 255] + }, + { + "SQL": "'-32768'::int2", + "Oid": 21, + "Text": "-32768", + "TextAsBinary": [45, 51, 50, 55, 54, 56], + "Binary": [128, 0] + }, + { + "SQL": "'32767'::int2", + "Oid": 21, + "Text": "32767", + "TextAsBinary": [51, 50, 55, 54, 55], + "Binary": [127, 255] + }, + { + "SQL": "'0'::int4", + "Oid": 23, + "Text": "0", + "TextAsBinary": [48], + "Binary": [0, 0, 0, 0] + }, + { + "SQL": "'1'::int4", + "Oid": 23, + "Text": "1", + "TextAsBinary": [49], + "Binary": [0, 0, 0, 1] + }, + { + "SQL": "'-1'::int4", + "Oid": 23, + "Text": "-1", + "TextAsBinary": [45, 49], + "Binary": [255, 255, 255, 255] + }, + { + "SQL": "'-32768'::int4", + "Oid": 23, + "Text": "-32768", + "TextAsBinary": [45, 51, 50, 55, 54, 56], + "Binary": [255, 255, 128, 0] + }, + { + "SQL": "'32767'::int4", + "Oid": 23, + "Text": "32767", + "TextAsBinary": [51, 50, 55, 54, 55], + "Binary": [0, 0, 127, 255] + }, + { + "SQL": "'-2147483648'::int4", + "Oid": 23, + "Text": "-2147483648", + "TextAsBinary": [45, 50, 49, 52, 55, 52, 56, 51, 54, 52, 56], + "Binary": [128, 0, 0, 0] + }, + { + "SQL": "'2147483647'::int4", + "Oid": 23, + "Text": "2147483647", + "TextAsBinary": [50, 49, 52, 55, 52, 56, 51, 54, 52, 55], + "Binary": [127, 255, 255, 255] + }, + { + "SQL": "'0'::int8", + "Oid": 20, + "Text": "0", + "TextAsBinary": [48], + "Binary": [0, 0, 0, 0, 0, 0, 0, 0] + }, + { + "SQL": "'1'::int8", + "Oid": 20, + "Text": "1", + "TextAsBinary": [49], + "Binary": [0, 0, 0, 0, 0, 0, 0, 1] + }, + { + "SQL": "'-1'::int8", + "Oid": 20, + "Text": "-1", + "TextAsBinary": [45, 49], + "Binary": [255, 255, 255, 255, 255, 255, 255, 255] + }, + { + "SQL": "'-32768'::int8", + "Oid": 20, + "Text": "-32768", + "TextAsBinary": [45, 51, 50, 55, 54, 56], + "Binary": [255, 255, 255, 255, 255, 255, 128, 0] + }, + { + "SQL": "'32767'::int8", + "Oid": 20, + "Text": "32767", + "TextAsBinary": [51, 50, 55, 54, 55], + "Binary": [0, 0, 0, 0, 0, 0, 127, 255] + }, + { + "SQL": "'-2147483648'::int8", + "Oid": 20, + "Text": "-2147483648", + "TextAsBinary": [45, 50, 49, 52, 55, 52, 56, 51, 54, 52, 56], + "Binary": [255, 255, 255, 255, 128, 0, 0, 0] + }, + { + "SQL": "'2147483647'::int8", + "Oid": 20, + "Text": "2147483647", + "TextAsBinary": [50, 49, 52, 55, 52, 56, 51, 54, 52, 55], + "Binary": [0, 0, 0, 0, 127, 255, 255, 255] + }, + { + "SQL": "'-9223372036854775808'::int8", + "Oid": 20, + "Text": "-9223372036854775808", + "TextAsBinary": [45, 57, 50, 50, 51, 51, 55, 50, 48, 51, 54, 56, 53, 52, 55, 55, 53, 56, 48, 56], + "Binary": [128, 0, 0, 0, 0, 0, 0, 0] + }, + { + "SQL": "'9223372036854775807'::int8", + "Oid": 20, + "Text": "9223372036854775807", + "TextAsBinary": [57, 50, 50, 51, 51, 55, 50, 48, 51, 54, 56, 53, 52, 55, 55, 53, 56, 48, 55], + "Binary": [127, 255, 255, 255, 255, 255, 255, 255] + }, { "SQL": "'10y10mon'::interval", + "Oid": 1186, "Text": "10 years 10 mons", "TextAsBinary": [49, 48, 32, 121, 101, 97, 114, 115, 32, 49, 48, 32, 109, 111, 110, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130] }, { "SQL": "'10mon10d'::interval", + "Oid": 1186, "Text": "10 mons 10 days", "TextAsBinary": [49, 48, 32, 109, 111, 110, 115, 32, 49, 48, 32, 100, 97, 121, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 10] }, { "SQL": "'1y1mon'::interval", + "Oid": 1186, "Text": "1 year 1 mon", "TextAsBinary": [49, 32, 121, 101, 97, 114, 32, 49, 32, 109, 111, 110], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13] }, { "SQL": "'1y1m'::interval", + "Oid": 1186, "Text": "1 year 00:01:00", "TextAsBinary": [49, 32, 121, 101, 97, 114, 32, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [0, 0, 0, 0, 3, 147, 135, 0, 0, 0, 0, 0, 0, 0, 0, 12] }, { "SQL": "'1y'::interval", + "Oid": 1186, "Text": "1 year", "TextAsBinary": [49, 32, 121, 101, 97, 114], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12] }, { "SQL": "'1mon'::interval", + "Oid": 1186, "Text": "1 mon", "TextAsBinary": [49, 32, 109, 111, 110], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "'21d2h'::interval", + "Oid": 1186, "Text": "21 days 02:00:00", "TextAsBinary": [50, 49, 32, 100, 97, 121, 115, 32, 48, 50, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 1, 173, 39, 72, 0, 0, 0, 0, 21, 0, 0, 0, 0] }, { "SQL": "'1w'::interval", + "Oid": 1186, "Text": "7 days", "TextAsBinary": [55, 32, 100, 97, 121, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0] }, { "SQL": "'1d'::interval", + "Oid": 1186, "Text": "1 day", "TextAsBinary": [49, 32, 100, 97, 121], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0] }, { "SQL": "'23:12:34'::interval", + "Oid": 1186, "Text": "23:12:34", "TextAsBinary": [50, 51, 58, 49, 50, 58, 51, 52], "Binary": [0, 0, 0, 19, 116, 52, 220, 128, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'21 days'::interval", + "Oid": 1186, "Text": "21 days", "TextAsBinary": [50, 49, 32, 100, 97, 121, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0] }, { "SQL": "'3h'::interval", + "Oid": 1186, "Text": "03:00:00", "TextAsBinary": [48, 51, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 2, 131, 186, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'2h'::interval", + "Oid": 1186, "Text": "02:00:00", "TextAsBinary": [48, 50, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 1, 173, 39, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'1h'::interval", + "Oid": 1186, "Text": "01:00:00", "TextAsBinary": [48, 49, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 0, 214, 147, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'1m'::interval", + "Oid": 1186, "Text": "00:01:00", "TextAsBinary": [48, 48, 58, 48, 49, 58, 48, 48], "Binary": [0, 0, 0, 0, 3, 147, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'1s'::interval", + "Oid": 1186, "Text": "00:00:01", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 49], "Binary": [0, 0, 0, 0, 0, 15, 66, 64, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-23:00:00'::interval", + "Oid": 1186, "Text": "-23:00:00", "TextAsBinary": [45, 50, 51, 58, 48, 48, 58, 48, 48], "Binary": [255, 255, 255, 236, 184, 188, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-10d'::interval", + "Oid": 1186, "Text": "-10 days", "TextAsBinary": [45, 49, 48, 32, 100, 97, 121, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 246, 0, 0, 0, 0] }, { "SQL": "'-1mon'::interval", + "Oid": 1186, "Text": "-1 mons", "TextAsBinary": [45, 49, 32, 109, 111, 110, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255] }, { "SQL": "'-1mon10s'::interval", + "Oid": 1186, "Text": "-1 mons +00:00:10", "TextAsBinary": [45, 49, 32, 109, 111, 110, 115, 32, 43, 48, 48, 58, 48, 48, 58, 49, 48], "Binary": [0, 0, 0, 0, 0, 152, 150, 128, 0, 0, 0, 0, 255, 255, 255, 255] }, { "SQL": "'-1y'::interval", + "Oid": 1186, "Text": "-1 years", "TextAsBinary": [45, 49, 32, 121, 101, 97, 114, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 244] }, { "SQL": "'-1y1mon'::interval", + "Oid": 1186, "Text": "-11 mons", "TextAsBinary": [45, 49, 49, 32, 109, 111, 110, 115], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 245] }, { "SQL": "'-1y1mon10s'::interval", + "Oid": 1186, "Text": "-11 mons +00:00:10", "TextAsBinary": [45, 49, 49, 32, 109, 111, 110, 115, 32, 43, 48, 48, 58, 48, 48, 58, 49, 48], "Binary": [0, 0, 0, 0, 0, 152, 150, 128, 0, 0, 0, 0, 255, 255, 255, 245] }, { "SQL": "'1ms'::interval", + "Oid": 1186, "Text": "00:00:00.001", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 49], "Binary": [0, 0, 0, 0, 0, 0, 3, 232, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'.2ms'::interval", + "Oid": 1186, "Text": "00:00:00.0002", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 50], "Binary": [0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'.003ms'::interval", + "Oid": 1186, "Text": "00:00:00.000003", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 48, 48, 51], "Binary": [0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-6s2ms'::interval", + "Oid": 1186, "Text": "-00:00:05.998", "TextAsBinary": [45, 48, 48, 58, 48, 48, 58, 48, 53, 46, 57, 57, 56], "Binary": [255, 255, 255, 255, 255, 164, 122, 80, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-1d6s2ms'::interval", + "Oid": 1186, "Text": "-1 days +00:00:06.002", "TextAsBinary": [45, 49, 32, 100, 97, 121, 115, 32, 43, 48, 48, 58, 48, 48, 58, 48, 54, 46, 48, 48, 50], "Binary": [0, 0, 0, 0, 0, 91, 149, 80, 255, 255, 255, 255, 0, 0, 0, 0] }, { "SQL": "'-1d -6s2ms'::interval", + "Oid": 1186, "Text": "-1 days -00:00:05.998", "TextAsBinary": [45, 49, 32, 100, 97, 121, 115, 32, 45, 48, 48, 58, 48, 48, 58, 48, 53, 46, 57, 57, 56], "Binary": [255, 255, 255, 255, 255, 164, 122, 80, 255, 255, 255, 255, 0, 0, 0, 0] }, { "SQL": "'-1mon1m'::interval", + "Oid": 1186, "Text": "-1 mons +00:01:00", "TextAsBinary": [45, 49, 32, 109, 111, 110, 115, 32, 43, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [0, 0, 0, 0, 3, 147, 135, 0, 0, 0, 0, 0, 255, 255, 255, 255] }, { "SQL": "'-1mon -1m'::interval", + "Oid": 1186, "Text": "-1 mons -00:01:00", "TextAsBinary": [45, 49, 32, 109, 111, 110, 115, 32, 45, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [255, 255, 255, 255, 252, 108, 121, 0, 0, 0, 0, 0, 255, 255, 255, 255] }, { "SQL": "'-1d1m'::interval", + "Oid": 1186, "Text": "-1 days +00:01:00", "TextAsBinary": [45, 49, 32, 100, 97, 121, 115, 32, 43, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [0, 0, 0, 0, 3, 147, 135, 0, 255, 255, 255, 255, 0, 0, 0, 0] }, { "SQL": "'-1d -1m'::interval", + "Oid": 1186, "Text": "-1 days -00:01:00", "TextAsBinary": [45, 49, 32, 100, 97, 121, 115, 32, 45, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [255, 255, 255, 255, 252, 108, 121, 0, 255, 255, 255, 255, 0, 0, 0, 0] }, { "SQL": "'-1y1m'::interval", + "Oid": 1186, "Text": "-1 years +00:01:00", "TextAsBinary": [45, 49, 32, 121, 101, 97, 114, 115, 32, 43, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [0, 0, 0, 0, 3, 147, 135, 0, 0, 0, 0, 0, 255, 255, 255, 244] }, { "SQL": "'-1y -1m'::interval", + "Oid": 1186, "Text": "-1 years -00:01:00", "TextAsBinary": [45, 49, 32, 121, 101, 97, 114, 115, 32, 45, 48, 48, 58, 48, 49, 58, 48, 48], "Binary": [255, 255, 255, 255, 252, 108, 121, 0, 0, 0, 0, 0, 255, 255, 255, 244] }, { "SQL": "'3y4mon5d6ms'::interval", + "Oid": 1186, "Text": "3 years 4 mons 5 days 00:00:00.006", "TextAsBinary": [51, 32, 121, 101, 97, 114, 115, 32, 52, 32, 109, 111, 110, 115, 32, 53, 32, 100, 97, 121, 115, 32, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 54], "Binary": [0, 0, 0, 0, 0, 0, 23, 112, 0, 0, 0, 5, 0, 0, 0, 40] }, { "SQL": "'296537y20d15h30m7s'::interval", + "Oid": 1186, "Text": "296537 years 20 days 15:30:07", "TextAsBinary": [50, 57, 54, 53, 51, 55, 32, 121, 101, 97, 114, 115, 32, 50, 48, 32, 100, 97, 121, 115, 32, 49, 53, 58, 51, 48, 58, 48, 55], "Binary": [0, 0, 0, 12, 254, 91, 61, 192, 0, 0, 0, 20, 0, 54, 76, 44] }, { "SQL": "'-2965y -20d -15h -30m -7s'::interval", + "Oid": 1186, "Text": "-2965 years -20 days -15:30:07", "TextAsBinary": [45, 50, 57, 54, 53, 32, 121, 101, 97, 114, 115, 32, 45, 50, 48, 32, 100, 97, 121, 115, 32, 45, 49, 53, 58, 51, 48, 58, 48, 55], "Binary": [255, 255, 255, 243, 1, 164, 194, 64, 255, 255, 255, 236, 255, 255, 117, 4] }, { "SQL": "'00:00:00'::interval", + "Oid": 1186, "Text": "00:00:00", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'-00:00:00'::interval", + "Oid": 1186, "Text": "00:00:00", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'123'::jsonb", + "Oid": 3802, "Text": "123", "TextAsBinary": [49, 50, 51], "Binary": [1, 49, 50, 51] }, { "SQL": "'\"hello\"'::jsonb", + "Oid": 3802, "Text": "\"hello\"", "TextAsBinary": [34, 104, 101, 108, 108, 111, 34], "Binary": [1, 34, 104, 101, 108, 108, 111, 34] }, { "SQL": "'{}'::jsonb", + "Oid": 3802, "Text": "{}", "TextAsBinary": [123, 125], "Binary": [1, 123, 125] }, { "SQL": "'[]'::jsonb", + "Oid": 3802, "Text": "[]", "TextAsBinary": [91, 93], "Binary": [1, 91, 93] }, { "SQL": "'0'::jsonb", + "Oid": 3802, "Text": "0", "TextAsBinary": [48], "Binary": [1, 48] }, { "SQL": "'0.0000'::jsonb", + "Oid": 3802, "Text": "0.0000", "TextAsBinary": [48, 46, 48, 48, 48, 48], "Binary": [1, 48, 46, 48, 48, 48, 48] }, { "SQL": "'\"\"'::jsonb", + "Oid": 3802, "Text": "\"\"", "TextAsBinary": [34, 34], "Binary": [1, 34, 34] }, { "SQL": "'\"\\uD83D\\uDE80\"'::jsonb", + "Oid": 3802, "Text": "\"🚀\"", "TextAsBinary": [34, 240, 159, 154, 128, 34], "Binary": [1, 34, 240, 159, 154, 128, 34] }, { "SQL": "'{\"\\uD83D\\uDE80\": \"hello\"}'::jsonb", + "Oid": 3802, "Text": "{\"🚀\": \"hello\"}", "TextAsBinary": [123, 34, 240, 159, 154, 128, 34, 58, 32, 34, 104, 101, 108, 108, 111, 34, 125], "Binary": [1, 123, 34, 240, 159, 154, 128, 34, 58, 32, 34, 104, 101, 108, 108, 111, 34, 125] }, { "SQL": "'[1, 2, 3]'::jsonb", + "Oid": 3802, "Text": "[1, 2, 3]", "TextAsBinary": [91, 49, 44, 32, 50, 44, 32, 51, 93], "Binary": [1, 91, 49, 44, 32, 50, 44, 32, 51, 93] }, { "SQL": "'{\"foo\": 123}'::jsonb", + "Oid": 3802, "Text": "{\"foo\": 123}", "TextAsBinary": [123, 34, 102, 111, 111, 34, 58, 32, 49, 50, 51, 125], "Binary": [1, 123, 34, 102, 111, 111, 34, 58, 32, 49, 50, 51, 125] }, { "SQL": "'{\"foo\": {\"bar\": true}}'::jsonb", + "Oid": 3802, "Text": "{\"foo\": {\"bar\": true}}", "TextAsBinary": [123, 34, 102, 111, 111, 34, 58, 32, 123, 34, 98, 97, 114, 34, 58, 32, 116, 114, 117, 101, 125, 125], "Binary": [1, 123, 34, 102, 111, 111, 34, 58, 32, 123, 34, 98, 97, 114, 34, 58, 32, 116, 114, 117, 101, 125, 125] }, { "SQL": "'true'::jsonb", + "Oid": 3802, "Text": "true", "TextAsBinary": [116, 114, 117, 101], "Binary": [1, 116, 114, 117, 101] }, { "SQL": "'false'::jsonb", + "Oid": 3802, "Text": "false", "TextAsBinary": [102, 97, 108, 115, 101], "Binary": [1, 102, 97, 108, 115, 101] }, { "SQL": "'null'::jsonb", + "Oid": 3802, "Text": "null", "TextAsBinary": [110, 117, 108, 108], "Binary": [1, 110, 117, 108, 108] }, { "SQL": "'[[[[true, false, null]]]]'::jsonb", + "Oid": 3802, "Text": "[[[[true, false, null]]]]", "TextAsBinary": [91, 91, 91, 91, 116, 114, 117, 101, 44, 32, 102, 97, 108, 115, 101, 44, 32, 110, 117, 108, 108, 93, 93, 93, 93], "Binary": [1, 91, 91, 91, 91, 116, 114, 117, 101, 44, 32, 102, 97, 108, 115, 101, 44, 32, 110, 117, 108, 108, 93, 93, 93, 93] }, { "SQL": "'[\"\\u0001\", \"\\u0041\", \"\\u26a3\", \"\\ud83e\\udd37\"]'::jsonb", + "Oid": 3802, "Text": "[\"\\u0001\", \"A\", \"⚣\", \"🤷\"]", "TextAsBinary": [91, 34, 92, 117, 48, 48, 48, 49, 34, 44, 32, 34, 65, 34, 44, 32, 34, 226, 154, 163, 34, 44, 32, 34, 240, 159, 164, 183, 34, 93], "Binary": [1, 91, 34, 92, 117, 48, 48, 48, 49, 34, 44, 32, 34, 65, 34, 44, 32, 34, 226, 154, 163, 34, 44, 32, 34, 240, 159, 164, 183, 34, 93] }, { "SQL": "'00:00:00'::time", + "Oid": 1083, "Text": "00:00:00", "TextAsBinary": [48, 48, 58, 48, 48, 58, 48, 48], "Binary": [0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'12:00:00.000001'::time", + "Oid": 1083, "Text": "12:00:00.000001", "TextAsBinary": [49, 50, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 48, 48, 49], "Binary": [0, 0, 0, 10, 14, 235, 176, 1] }, { "SQL": "'23:59:59.999999'::time", + "Oid": 1083, "Text": "23:59:59.999999", "TextAsBinary": [50, 51, 58, 53, 57, 58, 53, 57, 46, 57, 57, 57, 57, 57, 57], "Binary": [0, 0, 0, 20, 29, 215, 95, 255] }, { "SQL": "'1999-01-08 04:05:06+00'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'1999-01-08 04:05:06+00:00'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'1999-01-08 04:05:06+10'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'1999-01-08 04:05:06+10:00'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'1999-01-08 04:05:06+10:30'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'1999-01-08 04:05:06'::timestamp", + "Oid": 1114, "Text": "1999-01-08 04:05:06", "TextAsBinary": [49, 57, 57, 57, 45, 48, 49, 45, 48, 56, 32, 48, 52, 58, 48, 53, 58, 48, 54], "Binary": [255, 255, 227, 225, 177, 91, 128, 128] }, { "SQL": "'2004-10-19 10:23:54'::timestamp", + "Oid": 1114, "Text": "2004-10-19 10:23:54", "TextAsBinary": [50, 48, 48, 52, 45, 49, 48, 45, 49, 57, 32, 49, 48, 58, 50, 51, 58, 53, 52], "Binary": [0, 0, 137, 201, 15, 13, 226, 128] }, { "SQL": "'0001-01-01 00:00:00'::timestamp", + "Oid": 1114, "Text": "0001-01-01 00:00:00", "TextAsBinary": [48, 48, 48, 49, 45, 48, 49, 45, 48, 49, 32, 48, 48, 58, 48, 48, 58, 48, 48], "Binary": [255, 31, 226, 255, 197, 156, 96, 0] }, { "SQL": "'0004-10-19 10:23:54'::timestamp", + "Oid": 1114, "Text": "0004-10-19 10:23:54", "TextAsBinary": [48, 48, 48, 52, 45, 49, 48, 45, 49, 57, 32, 49, 48, 58, 50, 51, 58, 53, 52], "Binary": [255, 32, 80, 6, 42, 191, 2, 128] }, { "SQL": "'0004-10-19 10:23:54 BC'::timestamp", + "Oid": 1114, "Text": "0004-10-19 10:23:54 BC", "TextAsBinary": [48, 48, 48, 52, 45, 49, 48, 45, 49, 57, 32, 49, 48, 58, 50, 51, 58, 53, 52, 32, 66, 67], "Binary": [255, 31, 135, 24, 26, 133, 34, 128] }, { "SQL": "'4004-10-19 10:23:54'::timestamp", + "Oid": 1114, "Text": "4004-10-19 10:23:54", "TextAsBinary": [52, 48, 48, 52, 45, 49, 48, 45, 49, 57, 32, 49, 48, 58, 50, 51, 58, 53, 52], "Binary": [0, 224, 195, 139, 243, 92, 194, 128] }, { "SQL": "'9004-10-19 10:23:54'::timestamp", + "Oid": 1114, "Text": "9004-10-19 10:23:54", "TextAsBinary": [57, 48, 48, 52, 45, 49, 48, 45, 49, 57, 32, 49, 48, 58, 50, 51, 58, 53, 52], "Binary": [3, 17, 83, 233, 31, 54, 66, 128] }, { "SQL": "'{00000000-0000-0000-0000-000000000000}'::uuid[]", + "Oid": 2951, "Text": "{00000000-0000-0000-0000-000000000000}", "TextAsBinary": [123, 48, 48, 48, 48, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 45, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 11, 134, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "'{9753b405-88c0-4e93-b6c3-4e49fff11b57}'::uuid[]", + "Oid": 2951, "Text": "{9753b405-88c0-4e93-b6c3-4e49fff11b57}", "TextAsBinary": [123, 57, 55, 53, 51, 98, 52, 48, 53, 45, 56, 56, 99, 48, 45, 52, 101, 57, 51, 45, 98, 54, 99, 51, 45, 52, 101, 52, 57, 102, 102, 102, 49, 49, 98, 53, 55, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 11, 134, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 151, 83, 180, 5, 136, 192, 78, 147, 182, 195, 78, 73, 255, 241, 27, 87] }, { "SQL": "'{be18196d-b20a-4df2-8a2b-259c22842ee8,e0794335-6d39-47d9-b836-1f2ff349bf5d}'::uuid[]", + "Oid": 2951, "Text": "{be18196d-b20a-4df2-8a2b-259c22842ee8,e0794335-6d39-47d9-b836-1f2ff349bf5d}", "TextAsBinary": [123, 98, 101, 49, 56, 49, 57, 54, 100, 45, 98, 50, 48, 97, 45, 52, 100, 102, 50, 45, 56, 97, 50, 98, 45, 50, 53, 57, 99, 50, 50, 56, 52, 50, 101, 101, 56, 44, 101, 48, 55, 57, 52, 51, 51, 53, 45, 54, 100, 51, 57, 45, 52, 55, 100, 57, 45, 98, 56, 51, 54, 45, 49, 102, 50, 102, 102, 51, 52, 57, 98, 102, 53, 100, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 11, 134, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 16, 190, 24, 25, 109, 178, 10, 77, 242, 138, 43, 37, 156, 34, 132, 46, 232, 0, 0, 0, 16, 224, 121, 67, 53, 109, 57, 71, 217, 184, 54, 31, 47, 243, 73, 191, 93] }, { "SQL": "(1::int8,2::int8,3::int8,4::int8,null)", + "Oid": 2249, "Text": "(1,2,3,4,)", "TextAsBinary": [40, 49, 44, 50, 44, 51, 44, 52, 44, 41], "Binary": [0, 0, 0, 5, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "('test with spaces'::BYTEA,null)", + "Oid": 2249, "Text": "(\"\\\\x74657374207769746820737061636573\",)", "TextAsBinary": [40, 34, 92, 92, 120, 55, 52, 54, 53, 55, 51, 55, 52, 50, 48, 55, 55, 54, 57, 55, 52, 54, 56, 50, 48, 55, 51, 55, 48, 54, 49, 54, 51, 54, 53, 55, 51, 34, 44, 41], "Binary": [0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 16, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "('test with spaces'::TEXT,null)", + "Oid": 2249, "Text": "(\"test with spaces\",)", "TextAsBinary": [40, 34, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115, 34, 44, 41], "Binary": [0, 0, 0, 2, 0, 0, 0, 25, 0, 0, 0, 16, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "('name'::NAME,null)", + "Oid": 2249, "Text": "(name,)", "TextAsBinary": [40, 110, 97, 109, 101, 44, 41], "Binary": [0, 0, 0, 2, 0, 0, 0, 19, 0, 0, 0, 4, 110, 97, 109, 101, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "('false'::JSONB,null)", + "Oid": 2249, "Text": "(false,)", "TextAsBinary": [40, 102, 97, 108, 115, 101, 44, 41], "Binary": [0, 0, 0, 2, 0, 0, 14, 218, 0, 0, 0, 6, 1, 102, 97, 108, 115, 101, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "('{\"a\": []}'::JSONB,null)", + "Oid": 2249, "Text": "(\"{\"\"a\"\": []}\",)", "TextAsBinary": [40, 34, 123, 34, 34, 97, 34, 34, 58, 32, 91, 93, 125, 34, 44, 41], "Binary": [0, 0, 0, 2, 0, 0, 14, 218, 0, 0, 0, 10, 1, 123, 34, 97, 34, 58, 32, 91, 93, 125, 0, 0, 2, 193, 255, 255, 255, 255] }, { "SQL": "B''", + "Oid": 1560, "Text": "", "TextAsBinary": [], "Binary": [0, 0, 0, 0] }, { "SQL": "B'0'", + "Oid": 1560, "Text": "0", "TextAsBinary": [48], "Binary": [0, 0, 0, 1, 0] }, { "SQL": "B'1'", + "Oid": 1560, "Text": "1", "TextAsBinary": [49], "Binary": [0, 0, 0, 1, 128] }, { "SQL": "B'010'", + "Oid": 1560, "Text": "010", "TextAsBinary": [48, 49, 48], "Binary": [0, 0, 0, 3, 64] }, { "SQL": "B'00000000'", + "Oid": 1560, "Text": "00000000", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 8, 0] }, { "SQL": "B'000000001'", + "Oid": 1560, "Text": "000000001", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 49], "Binary": [0, 0, 0, 9, 0, 128] }, { "SQL": "B'0010101000011010101111100100011001110101100001010101'", + "Oid": 1560, "Text": "0010101000011010101111100100011001110101100001010101", "TextAsBinary": [48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49], "Binary": [0, 0, 0, 52, 42, 26, 190, 70, 117, 133, 80] }, { "SQL": "B'00101010000110101011111001000110011101011000000101010000110101011111001000110011101011000010101011010101'", + "Oid": 1560, "Text": "00101010000110101011111001000110011101011000000101010000110101011111001000110011101011000010101011010101", "TextAsBinary": [48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 49, 48, 49, 48, 49, 48, 49], "Binary": [0, 0, 0, 104, 42, 26, 190, 70, 117, 129, 80, 213, 242, 51, 172, 42, 213] }, { "SQL": "B'0010101000011010101111100100011001110101001010100001101010111110010001100111010110000100101010000110101011111001000110011101011000010101010101010000101010000110101011111001000110011101010010101000011010101111100100011001110101100001001010100001101010111110010001100111010110000101010101010100101010000110101011111001000110011101011000010010101000011010101111100100011011111111111111111111111111111111111111111111111111111111111111110111010111111111111111111111111111111111111111111111111111111111111111111000010101010000000000000000000000000000000000000000000000000000000000000000101011000010010101000011010101111100100011001110101100001010101010101101010000110101011111001000110011101011000010010101000011010101111100100011011111111111111111111111111111111111111111111111111111111111111110111010111111111111111111111111111111111111111111111111111111111111111111000010101010000000000000000000000000000000000000000000000000000000000000000101011000010010101000011010101111100100011001110101100001010101010101'", + "Oid": 1560, "Text": "0010101000011010101111100100011001110101001010100001101010111110010001100111010110000100101010000110101011111001000110011101011000010101010101010000101010000110101011111001000110011101010010101000011010101111100100011001110101100001001010100001101010111110010001100111010110000101010101010100101010000110101011111001000110011101011000010010101000011010101111100100011011111111111111111111111111111111111111111111111111111111111111110111010111111111111111111111111111111111111111111111111111111111111111111000010101010000000000000000000000000000000000000000000000000000000000000000101011000010010101000011010101111100100011001110101100001010101010101101010000110101011111001000110011101011000010010101000011010101111100100011011111111111111111111111111111111111111111111111111111111111111110111010111111111111111111111111111111111111111111111111111111111111111111000010101010000000000000000000000000000000000000000000000000000000000000000101011000010010101000011010101111100100011001110101100001010101010101", "TextAsBinary": [48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 49, 49, 49, 48, 49, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 49, 49, 49, 48, 49, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 48, 49, 48, 49, 48, 49, 48, 48, 48, 48, 49, 49, 48, 49, 48, 49, 48, 49, 49, 49, 49, 49, 48, 48, 49, 48, 48, 48, 49, 49, 48, 48, 49, 49, 49, 48, 49, 48, 49, 49, 48, 48, 48, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49, 48, 49], "Binary": [0, 0, 3, 238, 42, 26, 190, 70, 117, 42, 26, 190, 70, 117, 132, 168, 106, 249, 25, 214, 21, 85, 10, 134, 175, 145, 157, 74, 134, 175, 145, 157, 97, 42, 26, 190, 70, 117, 133, 85, 74, 134, 175, 145, 157, 97, 42, 26, 190, 70, 255, 255, 255, 255, 255, 255, 255, 255, 117, 255, 255, 255, 255, 255, 255, 255, 255, 133, 80, 0, 0, 0, 0, 0, 0, 0, 10, 194, 84, 53, 124, 140, 235, 10, 170, 212, 53, 124, 140, 235, 9, 80, 213, 242, 55, 255, 255, 255, 255, 255, 255, 255, 251, 175, 255, 255, 255, 255, 255, 255, 255, 252, 42, 128, 0, 0, 0, 0, 0, 0, 0, 86, 18, 161, 171, 228, 103, 88, 85, 84] }, { "SQL": "B'000000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "000000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'0000000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "0000000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'00000000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "00000000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'000000000000000000000000000000000000000000000000000000000000001'", + "Oid": 1560, "Text": "000000000000000000000000000000000000000000000000000000000000001", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49], "Binary": [0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 2] }, { "SQL": "B'0000000000000000000000000000000000000000000000000000000000000001'", + "Oid": 1560, "Text": "0000000000000000000000000000000000000000000000000000000000000001", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49], "Binary": [0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 1] }, { "SQL": "B'00000000000000000000000000000000000000000000000000000000000000001'", + "Oid": 1560, "Text": "00000000000000000000000000000000000000000000000000000000000000001", "TextAsBinary": [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49], "Binary": [0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 128] }, { "SQL": "B'100000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "100000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 63, 128, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'1000000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "1000000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 64, 128, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'10000000000000000000000000000000000000000000000000000000000000000'", + "Oid": 1560, "Text": "10000000000000000000000000000000000000000000000000000000000000000", "TextAsBinary": [49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48], "Binary": [0, 0, 0, 65, 128, 0, 0, 0, 0, 0, 0, 0, 0] }, { "SQL": "B'111111111111111111111111111111111111111111111111111111111111111'", + "Oid": 1560, "Text": "111111111111111111111111111111111111111111111111111111111111111", "TextAsBinary": [49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49], "Binary": [0, 0, 0, 63, 255, 255, 255, 255, 255, 255, 255, 254] }, { "SQL": "B'1111111111111111111111111111111111111111111111111111111111111111'", + "Oid": 1560, "Text": "1111111111111111111111111111111111111111111111111111111111111111", "TextAsBinary": [49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49], "Binary": [0, 0, 0, 64, 255, 255, 255, 255, 255, 255, 255, 255] }, { "SQL": "B'11111111111111111111111111111111111111111111111111111111111111111'", + "Oid": 1560, "Text": "11111111111111111111111111111111111111111111111111111111111111111", "TextAsBinary": [49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49], "Binary": [0, 0, 0, 65, 255, 255, 255, 255, 255, 255, 255, 255, 128] }, { "SQL": "array['']", + "Oid": 1009, "Text": "{\"\"}", "TextAsBinary": [123, 34, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0] }, { "SQL": "array['\\x0d53e338548082'::BYTEA]", + "Oid": 1001, "Text": "{\"\\\\x0d53e338548082\"}", "TextAsBinary": [123, 34, 92, 92, 120, 48, 100, 53, 51, 101, 51, 51, 56, 53, 52, 56, 48, 56, 50, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 7, 13, 83, 227, 56, 84, 128, 130] }, { "SQL": "array['test with spaces'::BYTEA]", + "Oid": 1001, "Text": "{\"\\\\x74657374207769746820737061636573\"}", "TextAsBinary": [123, 34, 92, 92, 120, 55, 52, 54, 53, 55, 51, 55, 52, 50, 48, 55, 55, 54, 57, 55, 52, 54, 56, 50, 48, 55, 51, 55, 48, 54, 49, 54, 51, 54, 53, 55, 51, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115] }, { "SQL": "array['name'::NAME]", + "Oid": 1003, "Text": "{name}", "TextAsBinary": [123, 110, 97, 109, 101, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 4, 110, 97, 109, 101] }, { "SQL": "array[NULL]::text[]", + "Oid": 1009, "Text": "{NULL}", "TextAsBinary": [123, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 255, 255, 255, 255] }, { "SQL": "array[NULL,NULL]::text[]", + "Oid": 1009, "Text": "{NULL,NULL}", "TextAsBinary": [123, 78, 85, 76, 76, 44, 78, 85, 76, 76, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 25, 0, 0, 0, 2, 0, 0, 0, 1, 255, 255, 255, 255, 255, 255, 255, 255] }, { "SQL": "array[1,NULL,2]::text[]", + "Oid": 1009, "Text": "{1,NULL,2}", "TextAsBinary": [123, 49, 44, 78, 85, 76, 76, 44, 50, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 25, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 1, 49, 255, 255, 255, 255, 0, 0, 0, 1, 50] }, { "SQL": "array['']::text[]", + "Oid": 1009, "Text": "{\"\"}", "TextAsBinary": [123, 34, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0] }, { "SQL": "array['test']::text[]", + "Oid": 1009, "Text": "{test}", "TextAsBinary": [123, 116, 101, 115, 116, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 4, 116, 101, 115, 116] }, { "SQL": "array['test with spaces']::text[]", + "Oid": 1009, "Text": "{\"test with spaces\"}", "TextAsBinary": [123, 34, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 16, 116, 101, 115, 116, 32, 119, 105, 116, 104, 32, 115, 112, 97, 99, 101, 115] }, { "SQL": "array[e'\\f']::text[]", + "Oid": 1009, "Text": "{\"\f\"}", "TextAsBinary": [123, 34, 12, 34, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 12] }, { "SQL": "array[e'\\uFEFF']::text[]", + "Oid": 1009, "Text": "{\ufeff}", "TextAsBinary": [123, 239, 187, 191, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 239, 187, 191] }, { "SQL": "array[e'\\u2603']::text[]", + "Oid": 1009, "Text": "{☃}", "TextAsBinary": [123, 226, 152, 131, 125], "Binary": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 226, 152, 131] diff --git a/pkg/sql/pgwire/types.go b/pkg/sql/pgwire/types.go index 6aa03f718d57..559a9b805a73 100644 --- a/pkg/sql/pgwire/types.go +++ b/pkg/sql/pgwire/types.go @@ -181,8 +181,11 @@ func (b *writeBuffer) writeTextDatum( } } +// writeBinaryDatum writes d to the buffer. Oid must be specified for types +// that have various width encodings. It is ignored (and can be 0) for types +// with a 1:1 datum:oid mapping. func (b *writeBuffer) writeBinaryDatum( - ctx context.Context, d tree.Datum, sessionLoc *time.Location, + ctx context.Context, d tree.Datum, sessionLoc *time.Location, Oid oid.Oid, ) { if log.V(2) { log.Infof(ctx, "pgwire writing BINARY datum of type: %T, %#v", d, d) @@ -233,12 +236,31 @@ func (b *writeBuffer) writeBinaryDatum( } case *tree.DInt: - b.putInt32(8) - b.putInt64(int64(*v)) + switch Oid { + case oid.T_int2: + b.putInt32(2) + b.putInt16(int16(*v)) + case oid.T_int4: + b.putInt32(4) + b.putInt32(int32(*v)) + case oid.T_int8: + b.putInt32(8) + b.putInt64(int64(*v)) + default: + b.setError(errors.Errorf("unsupported int oid: %v", Oid)) + } case *tree.DFloat: - b.putInt32(8) - b.putInt64(int64(math.Float64bits(float64(*v)))) + switch Oid { + case oid.T_float4: + b.putInt32(4) + b.putInt32(int32(math.Float32bits(float32(*v)))) + case oid.T_float8: + b.putInt32(8) + b.putInt64(int64(math.Float64bits(float64(*v)))) + default: + b.setError(errors.Errorf("unsupported float oid: %v", Oid)) + } case *tree.DDecimal: if v.Form != apd.Finite { @@ -400,8 +422,9 @@ func (b *writeBuffer) writeBinaryDatum( // Put the number of datums. subWriter.putInt32(int32(len(v.D))) for _, elem := range v.D { - subWriter.putInt32(int32(elem.ResolvedType().Oid())) - subWriter.writeBinaryDatum(ctx, elem, sessionLoc) + oid := elem.ResolvedType().Oid() + subWriter.putInt32(int32(oid)) + subWriter.writeBinaryDatum(ctx, elem, sessionLoc, oid) } b.writeLengthPrefixedBuffer(&subWriter.wrapped) @@ -418,13 +441,14 @@ func (b *writeBuffer) writeBinaryDatum( if v.HasNulls { hasNulls = 1 } + oid := v.ParamTyp.Oid() subWriter.putInt32(int32(hasNulls)) - subWriter.putInt32(int32(v.ParamTyp.Oid())) + subWriter.putInt32(int32(oid)) subWriter.putInt32(int32(v.Len())) // Lower bound, we only support a lower bound of 1. subWriter.putInt32(1) for _, elem := range v.Array { - subWriter.writeBinaryDatum(ctx, elem, sessionLoc) + subWriter.writeBinaryDatum(ctx, elem, sessionLoc, oid) } b.writeLengthPrefixedBuffer(&subWriter.wrapped) case *tree.DJSON: diff --git a/pkg/sql/pgwire/types_test.go b/pkg/sql/pgwire/types_test.go index 61eb37679ef6..3912b2e8dedb 100644 --- a/pkg/sql/pgwire/types_test.go +++ b/pkg/sql/pgwire/types_test.go @@ -103,13 +103,13 @@ func TestWriteBinaryArray(t *testing.T) { writeBuf1 := newWriteBuffer(nil /* bytecount */) writeBuf1.writeTextDatum(context.Background(), ary, defaultConv) - writeBuf1.writeBinaryDatum(context.Background(), ary, time.UTC) + writeBuf1.writeBinaryDatum(context.Background(), ary, time.UTC, 0 /* oid */) writeBuf2 := newWriteBuffer(nil /* bytecount */) writeBuf2.writeTextDatum(context.Background(), ary, defaultConv) writeBuf3 := newWriteBuffer(nil /* bytecount */) - writeBuf3.writeBinaryDatum(context.Background(), ary, defaultConv.Location) + writeBuf3.writeBinaryDatum(context.Background(), ary, defaultConv.Location, 0 /* oid */) concatted := bytes.Join([][]byte{writeBuf2.wrapped.Bytes(), writeBuf3.wrapped.Bytes()}, nil) @@ -253,7 +253,7 @@ func TestCanWriteAllDatums(t *testing.T) { t.Fatalf("got %s while attempting to write datum %s as text", buf.err, d) } - buf.writeBinaryDatum(context.Background(), d, defaultConv.Location) + buf.writeBinaryDatum(context.Background(), d, defaultConv.Location, d.ResolvedType().Oid()) if buf.err != nil { t.Fatalf("got %s while attempting to write datum %s as binary", buf.err, d) } @@ -273,7 +273,9 @@ func benchmarkWriteType(b *testing.B, d tree.Datum, format pgwirebase.FormatCode buf.writeTextDatum(ctx, d, defaultConv) } if format == pgwirebase.FormatBinary { - writeMethod = buf.writeBinaryDatum + writeMethod = func(ctx context.Context, d tree.Datum, loc *time.Location) { + buf.writeBinaryDatum(ctx, d, loc, 0) + } } // Warm up the buffer. @@ -453,7 +455,7 @@ func BenchmarkDecodeBinaryDecimal(b *testing.B) { if err := expected.SetString(s); err != nil { b.Fatalf("could not set %q on decimal", s) } - wbuf.writeBinaryDatum(context.Background(), expected, nil /* sessionLoc */) + wbuf.writeBinaryDatum(context.Background(), expected, nil /* sessionLoc */, 0 /* oid */) rbuf := pgwirebase.ReadBuffer{Msg: wbuf.wrapped.Bytes()}