1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Remove the recently added node types ReloptElem and OptionDefElem in favor

of adding optional namespace and action fields to DefElem.  Having three
node types that do essentially the same thing bloats the code and leads
to errors of confusion, such as in yesterday's bug report from Khee Chin.
This commit is contained in:
Tom Lane
2009-04-04 21:12:31 +00:00
parent c973051ae6
commit 090173a3f9
17 changed files with 208 additions and 333 deletions

View File

@@ -22,7 +22,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.350 2009/03/10 22:09:25 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.351 2009/04/04 21:12:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2074,27 +2074,10 @@ _equalConstraint(Constraint *a, Constraint *b)
static bool
_equalDefElem(DefElem *a, DefElem *b)
{
COMPARE_STRING_FIELD(defnamespace);
COMPARE_STRING_FIELD(defname);
COMPARE_NODE_FIELD(arg);
return true;
}
static bool
_equalOptionDefElem(OptionDefElem *a, OptionDefElem *b)
{
COMPARE_SCALAR_FIELD(alter_op);
COMPARE_NODE_FIELD(def);
return true;
}
static bool
_equalReloptElem(ReloptElem *a, ReloptElem *b)
{
COMPARE_STRING_FIELD(nmspc);
COMPARE_STRING_FIELD(optname);
COMPARE_NODE_FIELD(arg);
COMPARE_SCALAR_FIELD(defaction);
return true;
}
@@ -2850,12 +2833,6 @@ equal(void *a, void *b)
case T_DefElem:
retval = _equalDefElem(a, b);
break;
case T_OptionDefElem:
retval = _equalOptionDefElem(a, b);
break;
case T_ReloptElem:
retval = _equalReloptElem(a, b);
break;
case T_LockingClause:
retval = _equalLockingClause(a, b);
break;