mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
My latest fixes to gram.y cause CREATE TABLE t (f1 bool default 1 < 2)
to be accepted, but constraints regress test was expecting it to fail.
This commit is contained in:
parent
ea4ae10849
commit
79f39c4d34
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user