Skip to content

Commit 48e1a39

Browse files
committed
I guess the intention was to test incomplete SELECT statements, not
missing semicolons. I also added a SELECT statement without a target list. Manfred Koizar
1 parent 92a162c commit 48e1a39

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/test/regress/expected/errors.out

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
-- ERRORS
33
--
44
-- bad in postquel, but ok in postsql
5-
select 1
5+
select 1;
6+
?column?
7+
----------
8+
1
9+
(1 row)
10+
611
--
712
-- UNSUPPORTED STUFF
813

@@ -16,10 +21,14 @@ select 1
1621
-- RETRIEVE
1722

1823
-- missing relation name
19-
select
24+
select;
25+
ERROR: parser: parse error at or near ";" at character 7
2026
-- no such relation
2127
select * from nonesuch;
22-
ERROR: parser: parse error at or near "select" at character 10
28+
ERROR: Relation "nonesuch" does not exist
29+
-- missing target list
30+
select from pg_database;
31+
ERROR: parser: parse error at or near "from" at character 8
2332
-- bad name in target list
2433
select nonesuch from pg_database;
2534
ERROR: Attribute "nonesuch" not found

src/test/regress/sql/errors.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--
44

55
-- bad in postquel, but ok in postsql
6-
select 1
6+
select 1;
77

88

99
--
@@ -20,11 +20,13 @@ select 1
2020
-- RETRIEVE
2121

2222
-- missing relation name
23-
select
23+
select;
2424

2525
-- no such relation
2626
select * from nonesuch;
2727

28+
-- missing target list
29+
select from pg_database;
2830
-- bad name in target list
2931
select nonesuch from pg_database;
3032
-- bad attribute name on lhs of operator

0 commit comments

Comments
 (0)