mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
Remove not-really-standard implementation of CREATE TABLE's UNDER clause,
and revert documentation to describe the existing INHERITS clause instead, per recent discussion in pghackers. Also fix implementation of SQL_inheritance SET variable: it is not cool to look at this var during the initial parsing phase, only during parse_analyze(). See recent bug report concerning misinterpretation of date constants just after a SET TIMEZONE command. gram.y really has to be an invariant transformation of the query string to a raw parsetree; anything that can vary with time must be done during parse analysis.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.135 2000/12/14 22:30:42 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.136 2001/01/05 06:34:17 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1675,7 +1675,7 @@ _copyRangeVar(RangeVar *from)
|
||||
|
||||
if (from->relname)
|
||||
newnode->relname = pstrdup(from->relname);
|
||||
newnode->inh = from->inh;
|
||||
newnode->inhOpt = from->inhOpt;
|
||||
Node_Copy(from, newnode, name);
|
||||
|
||||
return newnode;
|
||||
@@ -1829,7 +1829,7 @@ _copyDeleteStmt(DeleteStmt *from)
|
||||
if (from->relname)
|
||||
newnode->relname = pstrdup(from->relname);
|
||||
Node_Copy(from, newnode, whereClause);
|
||||
newnode->inh = from->inh;
|
||||
newnode->inhOpt = from->inhOpt;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@ _copyUpdateStmt(UpdateStmt *from)
|
||||
Node_Copy(from, newnode, targetList);
|
||||
Node_Copy(from, newnode, whereClause);
|
||||
Node_Copy(from, newnode, fromClause);
|
||||
newnode->inh = from->inh;
|
||||
newnode->inhOpt = from->inhOpt;
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -1900,7 +1900,7 @@ _copyAlterTableStmt(AlterTableStmt *from)
|
||||
newnode->subtype = from->subtype;
|
||||
if (from->relname)
|
||||
newnode->relname = pstrdup(from->relname);
|
||||
newnode->inh = from->inh;
|
||||
newnode->inhOpt = from->inhOpt;
|
||||
if (from->name)
|
||||
newnode->name = pstrdup(from->name);
|
||||
Node_Copy(from, newnode, def);
|
||||
@@ -2137,7 +2137,7 @@ _copyRenameStmt(RenameStmt *from)
|
||||
RenameStmt *newnode = makeNode(RenameStmt);
|
||||
|
||||
newnode->relname = pstrdup(from->relname);
|
||||
newnode->inh = from->inh;
|
||||
newnode->inhOpt = from->inhOpt;
|
||||
if (from->column)
|
||||
newnode->column = pstrdup(from->column);
|
||||
if (from->newname)
|
||||
|
||||
@@ -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.85 2000/12/14 22:30:42 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.86 2001/01/05 06:34:17 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -651,7 +651,7 @@ _equalDeleteStmt(DeleteStmt *a, DeleteStmt *b)
|
||||
return false;
|
||||
if (!equal(a->whereClause, b->whereClause))
|
||||
return false;
|
||||
if (a->inh != b->inh)
|
||||
if (a->inhOpt != b->inhOpt)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -668,7 +668,7 @@ _equalUpdateStmt(UpdateStmt *a, UpdateStmt *b)
|
||||
return false;
|
||||
if (!equal(a->fromClause, b->fromClause))
|
||||
return false;
|
||||
if (a->inh != b->inh)
|
||||
if (a->inhOpt != b->inhOpt)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -741,7 +741,7 @@ _equalAlterTableStmt(AlterTableStmt *a, AlterTableStmt *b)
|
||||
return false;
|
||||
if (!equalstr(a->relname, b->relname))
|
||||
return false;
|
||||
if (a->inh != b->inh)
|
||||
if (a->inhOpt != b->inhOpt)
|
||||
return false;
|
||||
if (!equalstr(a->name, b->name))
|
||||
return false;
|
||||
@@ -998,7 +998,7 @@ _equalRenameStmt(RenameStmt *a, RenameStmt *b)
|
||||
{
|
||||
if (!equalstr(a->relname, b->relname))
|
||||
return false;
|
||||
if (a->inh != b->inh)
|
||||
if (a->inhOpt != b->inhOpt)
|
||||
return false;
|
||||
if (!equalstr(a->column, b->column))
|
||||
return false;
|
||||
@@ -1501,7 +1501,7 @@ _equalRangeVar(RangeVar *a, RangeVar *b)
|
||||
{
|
||||
if (!equalstr(a->relname, b->relname))
|
||||
return false;
|
||||
if (a->inh != b->inh)
|
||||
if (a->inhOpt != b->inhOpt)
|
||||
return false;
|
||||
if (!equal(a->name, b->name))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user