OSDN Git Service

transformCreateStmt should put Ident nodes, not ColumnDef nodes, into
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Mar 2000 23:34:19 +0000 (23:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 24 Mar 2000 23:34:19 +0000 (23:34 +0000)
commit5c462baebcd96d5a7921d116ac9ee11bbced58a5
tree3689972b31d293126d3cca6277a2dbb0664e01cc
parent8f50f7a29114d4510a1b87cf13b687dcfd2e7f56
transformCreateStmt should put Ident nodes, not ColumnDef nodes, into
keys lists of Constraint nodes.  This eliminates a type pun that would
probably have caused trouble someday, and eliminates circular references
in the parsetree that were causing trouble now.
Also, change parser's uses of strcasecmp() to strcmp().  Since scan.l
has downcased any unquoted identifier, it is never correct to check an
identifier with strcasecmp() in the parser.  For example,
CREATE TABLE FOO (f1 int, UNIQUE("F1"));
was accepted, which is wrong, and xlateSqlFunc did more than it should:
select datetime();
ERROR:  Function 'timestamp()' does not exist
(good)
select "DateTime"();
ERROR:  Function 'timestamp()' does not exist
(bad)
src/backend/parser/analyze.c
src/backend/parser/gram.y