postgres: add more tests (to handle zero-rows queries) (#84384)

This commit is contained in:
Gábor Farkas
2024-03-13 16:23:50 +01:00
committed by GitHub
parent 2420c5aa4d
commit eca1bba01e
5 changed files with 98 additions and 0 deletions
@@ -0,0 +1,36 @@
// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "typeVersion": [
// 0,
// 0
// ],
// "executedQueryString": "SELECT * FROM tbl WHERE false"
// }
// Name:
// Dimensions: 0 Fields by 0 Rows
// +
// +
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"meta": {
"typeVersion": [
0,
0
],
"executedQueryString": "SELECT * FROM tbl WHERE false"
},
"fields": []
},
"data": {
"values": []
}
}
]
}
@@ -0,0 +1,12 @@
-- SELECT * FROM tbl WHERE false
CREATE TEMPORARY TABLE tbl (
"time" timestamp with time zone,
v double precision,
c text
);
INSERT INTO tbl ("time", v, c) VALUES
('2023-12-24 14:30:03 UTC', 10, 'a'),
('2023-12-24 14:30:03 UTC', 110, 'b'),
('2023-12-24 14:31:03 UTC', 20, 'a'),
('2023-12-24 14:31:03 UTC', 120, 'b');