]> granicus.if.org Git - postgresql/commitdiff
My latest fixes to gram.y cause CREATE TABLE t (f1 bool default 1 < 2)
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Nov 1999 21:41:31 +0000 (21:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Nov 1999 21:41:31 +0000 (21:41 +0000)
to be accepted, but constraints regress test was expecting it to fail.

src/test/regress/input/constraints.source
src/test/regress/output/constraints.source

index a4f02d59d7dc86bfc1a90fe6c6ac99e916867fa1..af10193c3333a597e216738fff6d91094cec64ae 100644 (file)
@@ -40,9 +40,9 @@ CREATE TABLE error_tbl (i int DEFAULT (100, ));
 --  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
 --  part of the column definition syntax:
-CREATE TABLE error_tbl (b1 bool DEFAULT 1 < 2);
+CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
 --  this should work, however:
-CREATE TABLE error_tbl (b1 bool DEFAULT (1 < 2));
+CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
 
 DROP TABLE error_tbl;
 
index 6b905e7f42c34312fea63e78f0f7302168e60a92..d7bb59cbf810d781444dd38c4c2b613ed2c434a9 100644 (file)
@@ -33,9 +33,9 @@ four| i1|i2
 
 QUERY: CREATE TABLE error_tbl (i int DEFAULT (100, ));
 ERROR:  parser: parse error at or near ","
-QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT 1 < 2);
-ERROR:  parser: parse error at or near "<"
-QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT (1 < 2));
+QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
+ERROR:  parser: parse error at or near "in"
+QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
 QUERY: DROP TABLE error_tbl;
 QUERY: CREATE TABLE CHECK_TBL (x int,
        CONSTRAINT CHECK_CON CHECK (x > 3));