From ad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 6 Apr 2005 16:34:07 +0000 Subject: 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. --- src/backend/nodes/readfuncs.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'src/backend/nodes/readfuncs.c') diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index f04668b6be7..f457d063315 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.175 2004/12/31 21:59:55 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/readfuncs.c,v 1.176 2005/04/06 16:34:05 tgl Exp $ * * NOTES * Path and Plan nodes do not have any readfuncs support, because we @@ -238,26 +238,6 @@ _readSetOperationStmt(void) * Stuff from primnodes.h. */ -/* - * _readResdom - */ -static Resdom * -_readResdom(void) -{ - READ_LOCALS(Resdom); - - READ_INT_FIELD(resno); - READ_OID_FIELD(restype); - READ_INT_FIELD(restypmod); - READ_STRING_FIELD(resname); - READ_UINT_FIELD(ressortgroupref); - READ_OID_FIELD(resorigtbl); - READ_INT_FIELD(resorigcol); - READ_BOOL_FIELD(resjunk); - - READ_DONE(); -} - static Alias * _readAlias(void) { @@ -787,8 +767,13 @@ _readTargetEntry(void) { READ_LOCALS(TargetEntry); - READ_NODE_FIELD(resdom); READ_NODE_FIELD(expr); + READ_INT_FIELD(resno); + READ_STRING_FIELD(resname); + READ_UINT_FIELD(ressortgroupref); + READ_OID_FIELD(resorigtbl); + READ_INT_FIELD(resorigcol); + READ_BOOL_FIELD(resjunk); READ_DONE(); } @@ -952,8 +937,6 @@ parseNodeString(void) return_value = _readGroupClause(); else if (MATCH("SETOPERATIONSTMT", 16)) return_value = _readSetOperationStmt(); - else if (MATCH("RESDOM", 6)) - return_value = _readResdom(); else if (MATCH("ALIAS", 5)) return_value = _readAlias(); else if (MATCH("RANGEVAR", 8)) -- cgit v1.2.3