diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-06 16:34:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-06 16:34:07 +0000 |
commit | ad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2 (patch) | |
tree | 18ec8963fbd1d6dd62ad214bfe3552fc2e7d06eb /src/backend/nodes/equalfuncs.c | |
parent | 0f3748a28c42d09d794ff00af3f1f992eaa5fd7c (diff) |
Merge Resdom nodes into TargetEntry nodes to simplify code and save a
few palloc's. I also chose to eliminate the restype and restypmod fields
entirely, since they are redundant with information stored in the node's
contained expression; re-examining the expression at need seems simpler
and more reliable than trying to keep restype/restypmod up to date.
initdb forced due to change in contents of stored rules.
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index bcf8c363937..958e320b47d 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.238 2005/03/29 17:58:50 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.239 2005/04/06 16:34:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -83,21 +83,6 @@ */ static bool -_equalResdom(Resdom *a, Resdom *b) -{ - COMPARE_SCALAR_FIELD(resno); - COMPARE_SCALAR_FIELD(restype); - COMPARE_SCALAR_FIELD(restypmod); - COMPARE_STRING_FIELD(resname); - COMPARE_SCALAR_FIELD(ressortgroupref); - COMPARE_SCALAR_FIELD(resorigtbl); - COMPARE_SCALAR_FIELD(resorigcol); - COMPARE_SCALAR_FIELD(resjunk); - - return true; -} - -static bool _equalAlias(Alias *a, Alias *b) { COMPARE_STRING_FIELD(aliasname); @@ -546,8 +531,13 @@ _equalSetToDefault(SetToDefault *a, SetToDefault *b) static bool _equalTargetEntry(TargetEntry *a, TargetEntry *b) { - COMPARE_NODE_FIELD(resdom); COMPARE_NODE_FIELD(expr); + COMPARE_SCALAR_FIELD(resno); + COMPARE_STRING_FIELD(resname); + COMPARE_SCALAR_FIELD(ressortgroupref); + COMPARE_SCALAR_FIELD(resorigtbl); + COMPARE_SCALAR_FIELD(resorigcol); + COMPARE_SCALAR_FIELD(resjunk); return true; } @@ -1814,9 +1804,6 @@ equal(void *a, void *b) /* * PRIMITIVE NODES */ - case T_Resdom: - retval = _equalResdom(a, b); - break; case T_Alias: retval = _equalAlias(a, b); break; |