diff options
Diffstat (limited to 'src/test/regress/sql/json.sql')
-rw-r--r-- | src/test/regress/sql/json.sql | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/regress/sql/json.sql b/src/test/regress/sql/json.sql index a52beaa27a1..e0216645923 100644 --- a/src/test/regress/sql/json.sql +++ b/src/test/regress/sql/json.sql @@ -522,6 +522,8 @@ SELECT rec FROM json_populate_record( -- anonymous record type SELECT json_populate_record(null::record, '{"x": 0, "y": 1}'); SELECT json_populate_record(row(1,2), '{"f1": 0, "f2": 1}'); +SELECT * FROM + json_populate_record(null::record, '{"x": 776}') AS (x int, y int); -- composite domain SELECT json_populate_record(null::j_ordered_pair, '{"x": 0, "y": 1}'); @@ -549,11 +551,15 @@ SELECT json_populate_recordset(null::record, '[{"x": 0, "y": 1}]'); SELECT json_populate_recordset(row(1,2), '[{"f1": 0, "f2": 1}]'); SELECT i, json_populate_recordset(row(i,50), '[{"f1":"42"},{"f2":"43"}]') FROM (VALUES (1),(2)) v(i); +SELECT * FROM + json_populate_recordset(null::record, '[{"x": 776}]') AS (x int, y int); -- empty array is a corner case SELECT json_populate_recordset(null::record, '[]'); SELECT json_populate_recordset(row(1,2), '[]'); SELECT * FROM json_populate_recordset(NULL::jpop,'[]') q; +SELECT * FROM + json_populate_recordset(null::record, '[]') AS (x int, y int); -- composite domain SELECT json_populate_recordset(null::j_ordered_pair, '[{"x": 0, "y": 1}]'); |