Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48e1a39

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 parent92a162c commit48e1a39

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-
select1
6+
select1;
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+
selectfrom pg_database;
2830
-- bad name in target list
2931
select nonesuchfrom pg_database;
3032
-- bad attribute name on lhs of operator

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp