Skip to content

Commit 79f39c4

Browse files
committed
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.
1 parent ea4ae10 commit 79f39c4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/regress/input/constraints.source

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ CREATE TABLE error_tbl (i int DEFAULT (100, ));
4040
-- this will fail because gram.y uses b_expr not a_expr for defaults,
4141
-- to avoid a shift/reduce conflict that arises from NOT NULL being
4242
-- part of the column definition syntax:
43-
CREATE TABLE error_tbl (b1 bool DEFAULT 1 < 2);
43+
CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
4444
-- this should work, however:
45-
CREATE TABLE error_tbl (b1 bool DEFAULT (1 < 2));
45+
CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
4646

4747
DROP TABLE error_tbl;
4848

src/test/regress/output/constraints.source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ four| i1|i2
3333

3434
QUERY: CREATE TABLE error_tbl (i int DEFAULT (100, ));
3535
ERROR: parser: parse error at or near ","
36-
QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT 1 < 2);
37-
ERROR: parser: parse error at or near "<"
38-
QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT (1 < 2));
36+
QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT 1 IN (1, 2));
37+
ERROR: parser: parse error at or near "in"
38+
QUERY: CREATE TABLE error_tbl (b1 bool DEFAULT (1 IN (1, 2)));
3939
QUERY: DROP TABLE error_tbl;
4040
QUERY: CREATE TABLE CHECK_TBL (x int,
4141
CONSTRAINT CHECK_CON CHECK (x > 3));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy