diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-05 05:00:14 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-05 05:00:14 +0000 |
commit | 5251e7b3d07da28b48ec5c7930c8b57b554fd27a (patch) | |
tree | 6b0f24e3c8722839d2fc549d052995d2d4e3b763 /src/backend/nodes/equalfuncs.c | |
parent | d556920a982c29810c2afaf64ca4840713a424c1 (diff) |
CREATE TABLE foo (x,y,z) AS SELECT ... can't apply target column names
to the target list in gram.y; it must wait till after expansion of the
target list in analyze.c. Per bug report 4-Nov:
lx=# CREATE TABLE abc (a char, b char, c char);
CREATE
lx=# CREATE TABLE xyz (x, y, z) AS SELECT * FROM abc;
ERROR: CREATE TABLE/AS SELECT has mismatched column count
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 0a48a194df3..538a773e31b 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -20,7 +20,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.107 2001/10/25 05:49:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.108 2001/11/05 05:00:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -681,6 +681,8 @@ _equalSelectStmt(SelectStmt *a, SelectStmt *b) return false; if (a->istemp != b->istemp) return false; + if (!equal(a->intoColNames, b->intoColNames)) + return false; if (!equal(a->targetList, b->targetList)) return false; if (!equal(a->fromClause, b->fromClause)) |