Update 7.2 regression tests to match what you get when using a modern

version of Bison.
This commit is contained in:
Tom Lane 2004-08-19 20:03:49 +00:00
parent 9f7cf9c0a6
commit a59084fe5e
3 changed files with 30 additions and 30 deletions

View File

@ -19,7 +19,7 @@ select 1
select select
-- no such relation -- no such relation
select * from nonesuch; select * from nonesuch;
ERROR: parser: parse error at or near "select" ERROR: parser: syntax error at or near "select"
-- bad name in target list -- bad name in target list
select nonesuch from pg_database; select nonesuch from pg_database;
ERROR: Attribute 'nonesuch' not found ERROR: Attribute 'nonesuch' not found
@ -31,7 +31,7 @@ select * from pg_database where pg_database.datname = nonesuch;
ERROR: Attribute 'nonesuch' not found ERROR: Attribute 'nonesuch' not found
-- bad select distinct on syntax, distinct attribute missing -- bad select distinct on syntax, distinct attribute missing
select distinct on (foobar) from pg_database; select distinct on (foobar) from pg_database;
ERROR: parser: parse error at or near "from" ERROR: parser: syntax error at or near "from"
-- bad select distinct on syntax, distinct attribute not in target list -- bad select distinct on syntax, distinct attribute not in target list
select distinct on (foobar) * from pg_database; select distinct on (foobar) * from pg_database;
ERROR: Attribute 'foobar' not found ERROR: Attribute 'foobar' not found
@ -40,7 +40,7 @@ ERROR: Attribute 'foobar' not found
-- missing relation name (this had better not wildcard!) -- missing relation name (this had better not wildcard!)
delete from; delete from;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- no such relation -- no such relation
delete from nonesuch; delete from nonesuch;
ERROR: Relation "nonesuch" does not exist ERROR: Relation "nonesuch" does not exist
@ -49,7 +49,7 @@ ERROR: Relation "nonesuch" does not exist
-- missing relation name (this had better not wildcard!) -- missing relation name (this had better not wildcard!)
drop table; drop table;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- no such relation -- no such relation
drop table nonesuch; drop table nonesuch;
ERROR: table "nonesuch" does not exist ERROR: table "nonesuch" does not exist
@ -59,7 +59,7 @@ ERROR: table "nonesuch" does not exist
-- relation renaming -- relation renaming
-- missing relation name -- missing relation name
alter table rename; alter table rename;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- no such relation -- no such relation
alter table nonesuch rename to newnonesuch; alter table nonesuch rename to newnonesuch;
ERROR: Relation "nonesuch" does not exist ERROR: Relation "nonesuch" does not exist
@ -116,10 +116,10 @@ ERROR: Define: "basetype" unspecified
-- missing index name -- missing index name
drop index; drop index;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- bad index name -- bad index name
drop index 314159; drop index 314159;
ERROR: parser: parse error at or near "314159" ERROR: parser: syntax error at or near "314159"
-- no such index -- no such index
drop index nonesuch; drop index nonesuch;
ERROR: index "nonesuch" does not exist ERROR: index "nonesuch" does not exist
@ -128,13 +128,13 @@ ERROR: index "nonesuch" does not exist
-- missing aggregate name -- missing aggregate name
drop aggregate; drop aggregate;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- missing aggregate type -- missing aggregate type
drop aggregate newcnt1; drop aggregate newcnt1;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- bad aggregate name -- bad aggregate name
drop aggregate 314159 (int); drop aggregate 314159 (int);
ERROR: parser: parse error at or near "314159" ERROR: parser: syntax error at or near "314159"
-- bad aggregate type -- bad aggregate type
drop aggregate newcnt (nonesuch); drop aggregate newcnt (nonesuch);
ERROR: RemoveAggregate: type 'nonesuch' does not exist ERROR: RemoveAggregate: type 'nonesuch' does not exist
@ -149,10 +149,10 @@ ERROR: RemoveAggregate: aggregate 'newcnt' for type real does not exist
-- missing function name -- missing function name
drop function (); drop function ();
ERROR: parser: parse error at or near "(" ERROR: parser: syntax error at or near "("
-- bad function name -- bad function name
drop function 314159(); drop function 314159();
ERROR: parser: parse error at or near "314159" ERROR: parser: syntax error at or near "314159"
-- no such function -- no such function
drop function nonesuch(); drop function nonesuch();
ERROR: RemoveFunction: function 'nonesuch()' does not exist ERROR: RemoveFunction: function 'nonesuch()' does not exist
@ -161,10 +161,10 @@ ERROR: RemoveFunction: function 'nonesuch()' does not exist
-- missing type name -- missing type name
drop type; drop type;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- bad type name -- bad type name
drop type 314159; drop type 314159;
ERROR: parser: parse error at or near "314159" ERROR: parser: syntax error at or near "314159"
-- no such type -- no such type
drop type nonesuch; drop type nonesuch;
ERROR: RemoveType: type 'nonesuch' does not exist ERROR: RemoveType: type 'nonesuch' does not exist
@ -173,22 +173,22 @@ ERROR: RemoveType: type 'nonesuch' does not exist
-- missing everything -- missing everything
drop operator; drop operator;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- bad operator name -- bad operator name
drop operator equals; drop operator equals;
ERROR: parser: parse error at or near "equals" ERROR: parser: syntax error at or near "equals"
-- missing type list -- missing type list
drop operator ===; drop operator ===;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- missing parentheses -- missing parentheses
drop operator int4, int4; drop operator int4, int4;
ERROR: parser: parse error at or near "int4" ERROR: parser: syntax error at or near "int4"
-- missing operator name -- missing operator name
drop operator (int4, int4); drop operator (int4, int4);
ERROR: parser: parse error at or near "(" ERROR: parser: syntax error at or near "("
-- missing type list contents -- missing type list contents
drop operator === (); drop operator === ();
ERROR: parser: parse error at or near ")" ERROR: parser: syntax error at or near ")"
-- no such operator -- no such operator
drop operator === (int4); drop operator === (int4);
ERROR: parser: argument type missing (use NONE for unary operators) ERROR: parser: argument type missing (use NONE for unary operators)
@ -200,7 +200,7 @@ drop operator = (nonesuch);
ERROR: parser: argument type missing (use NONE for unary operators) ERROR: parser: argument type missing (use NONE for unary operators)
-- no such type1 -- no such type1
drop operator = ( , int4); drop operator = ( , int4);
ERROR: parser: parse error at or near "," ERROR: parser: syntax error at or near ","
-- no such type1 -- no such type1
drop operator = (nonesuch, int4); drop operator = (nonesuch, int4);
ERROR: RemoveOperator: type 'nonesuch' does not exist ERROR: RemoveOperator: type 'nonesuch' does not exist
@ -209,25 +209,25 @@ drop operator = (int4, nonesuch);
ERROR: RemoveOperator: type 'nonesuch' does not exist ERROR: RemoveOperator: type 'nonesuch' does not exist
-- no such type2 -- no such type2
drop operator = (int4, ); drop operator = (int4, );
ERROR: parser: parse error at or near ")" ERROR: parser: syntax error at or near ")"
-- --
-- DROP RULE -- DROP RULE
-- missing rule name -- missing rule name
drop rule; drop rule;
ERROR: parser: parse error at or near ";" ERROR: parser: syntax error at or near ";"
-- bad rule name -- bad rule name
drop rule 314159; drop rule 314159;
ERROR: parser: parse error at or near "314159" ERROR: parser: syntax error at or near "314159"
-- no such rule -- no such rule
drop rule nonesuch; drop rule nonesuch;
ERROR: Rule or view "nonesuch" not found ERROR: Rule or view "nonesuch" not found
-- bad keyword -- bad keyword
drop tuple rule nonesuch; drop tuple rule nonesuch;
ERROR: parser: parse error at or near "tuple" ERROR: parser: syntax error at or near "tuple"
-- no such rule -- no such rule
drop instance rule nonesuch; drop instance rule nonesuch;
ERROR: parser: parse error at or near "instance" ERROR: parser: syntax error at or near "instance"
-- no such rule -- no such rule
drop rewrite rule nonesuch; drop rewrite rule nonesuch;
ERROR: parser: parse error at or near "rewrite" ERROR: parser: syntax error at or near "rewrite"

View File

@ -17,7 +17,7 @@ SELECT 'first line'
' - next line' /* this comment is not allowed here */ ' - next line' /* this comment is not allowed here */
' - third line' ' - third line'
AS "Illegal comment within continuation"; AS "Illegal comment within continuation";
ERROR: parser: parse error at or near "'" ERROR: parser: syntax error at or near "'"
-- --
-- test conversions between various string types -- test conversions between various string types
-- --

View File

@ -45,12 +45,12 @@ SELECT '' AS four, * FROM DEFAULTEXPR_TBL;
-- syntax errors -- syntax errors
-- test for extraneous comma -- test for extraneous comma
CREATE TABLE error_tbl (i int DEFAULT (100, )); CREATE TABLE error_tbl (i int DEFAULT (100, ));
ERROR: parser: parse error at or near "," ERROR: parser: syntax error at or near ","
-- this will fail because gram.y uses b_expr not a_expr for defaults, -- this will fail because gram.y uses b_expr not a_expr for defaults,
-- to avoid a shift/reduce conflict that arises from NOT NULL being -- to avoid a shift/reduce conflict that arises from NOT NULL being
-- part of the column definition syntax: -- part of the column definition syntax:
CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2)); CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
ERROR: parser: parse error at or near "IN" ERROR: parser: syntax error at or near "IN"
-- this should work, however: -- this should work, however:
CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2))); CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
DROP TABLE error_tbl; DROP TABLE error_tbl;