@@ -983,3 +983,50 @@ explain (costs off) select * from list_parted_tbl;
983983(3 rows)
984984
985985drop table list_parted_tbl;
986+ -- Handling trailing comma
987+ SELECT *, FROM onek
988+ WHERE onek.unique1 < 10
989+ ORDER BY onek.unique1;
990+ unique1 | unique2 | two | four | ten | twenty | hundred | thousand | twothousand | fivethous | tenthous | odd | even | stringu1 | stringu2 | string4
991+ ---------+---------+-----+------+-----+--------+---------+----------+-------------+-----------+----------+-----+------+----------+----------+---------
992+ 0 | 998 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | AAAAAA | KMBAAA | OOOOxx
993+ 1 | 214 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 3 | BAAAAA | GIAAAA | OOOOxx
994+ 2 | 326 | 0 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 4 | 5 | CAAAAA | OMAAAA | OOOOxx
995+ 3 | 431 | 1 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 6 | 7 | DAAAAA | PQAAAA | VVVVxx
996+ 4 | 833 | 0 | 0 | 4 | 4 | 4 | 4 | 4 | 4 | 4 | 8 | 9 | EAAAAA | BGBAAA | HHHHxx
997+ 5 | 541 | 1 | 1 | 5 | 5 | 5 | 5 | 5 | 5 | 5 | 10 | 11 | FAAAAA | VUAAAA | HHHHxx
998+ 6 | 978 | 0 | 2 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 12 | 13 | GAAAAA | QLBAAA | OOOOxx
999+ 7 | 647 | 1 | 3 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 14 | 15 | HAAAAA | XYAAAA | VVVVxx
1000+ 8 | 653 | 0 | 0 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 16 | 17 | IAAAAA | DZAAAA | HHHHxx
1001+ 9 | 49 | 1 | 1 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 18 | 19 | JAAAAA | XBAAAA | HHHHxx
1002+ (10 rows)
1003+
1004+ SELECT 1,,2,,,3 as dummy,;
1005+ ?column? | ?column? | dummy
1006+ ----------+----------+-------
1007+ 1 | 2 | 3
1008+ (1 row)
1009+
1010+ SELECT count(*),;
1011+ count
1012+ -------
1013+ 1
1014+ (1 row)
1015+
1016+ SELECT count(*), FROM onek;
1017+ count
1018+ -------
1019+ 1000
1020+ (1 row)
1021+
1022+ SELECT v.k as x, FROM (VALUES(1)) v(k);
1023+ x
1024+ ---
1025+ 1
1026+ (1 row)
1027+
1028+ -- Error is expected
1029+ SELECT ,;
1030+ ERROR: syntax error at or near ","
1031+ LINE 1: SELECT ,;
1032+ ^
0 commit comments