Skip to content

Commit 1b84967

Browse files
author
Yuwei Xiao
committed
more regress
1 parent 0be768f commit 1b84967

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/regression/sql/postgres_insert_select.sql

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ CREATE TABLE tbl_p2 PARTITION OF tbl FOR VALUES FROM (10) TO (20);
2020
INSERT INTO tbl select r['a']::int, r['b'] from duckdb.query($$ SELECT 1 a, 'abc' b $$) r;
2121
INSERT INTO tbl select r['a']::int, r['b'] from duckdb.query($$ SELECT 11 a, 'def' b $$) r;
2222
INSERT INTO tbl select r['a']::int, r['b'] from duckdb.query($$ SELECT 21 a, 'ghi' b $$) r;
23-
SELECT * FROM tbl ORDER BY a LIMIT 5;
23+
SELECT * FROM tbl_p1 ORDER BY a;
24+
SELECT * FROM tbl_p2 ORDER BY a;
2425
DROP TABLE tbl;
2526

2627
-- case: INSERT INTO TABLE (col1, col3)
@@ -48,3 +49,15 @@ INSERT INTO tbl (a, b) SELECT i, 'foo' FROM generate_series(1, 2) i;
4849
INSERT INTO tbl (a, b) SELECT i, 'qux' FROM generate_series(1, 4) i ON CONFLICT DO NOTHING;
4950
SELECT * FROM tbl;
5051
DROP TABLE tbl;
52+
53+
CREATE TABLE tbl (a INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, b text);
54+
INSERT INTO tbl (b) SELECT 'foo' FROM generate_series(1, 2);
55+
INSERT INTO tbl (b) SELECT 'qux' FROM generate_series(1, 4);;
56+
SELECT * FROM tbl;
57+
DROP TABLE tbl;
58+
59+
CREATE TABLE tbl (a SERIAL PRIMARY KEY, b text);
60+
INSERT INTO tbl (b) SELECT 'foo' FROM generate_series(1, 2);
61+
INSERT INTO tbl (b) SELECT 'qux' FROM generate_series(1, 4);;
62+
SELECT * FROM tbl;
63+
DROP TABLE tbl;

0 commit comments

Comments
 (0)