aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/readfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-06 16:34:07 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-06 16:34:07 +0000
commitad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2 (patch)
tree18ec8963fbd1d6dd62ad214bfe3552fc2e7d06eb /src/backend/nodes/readfuncs.c
parent0f3748a28c42d09d794ff00af3f1f992eaa5fd7c (diff)
downloadpostgresql-ad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2.tar.gz
postgresql-ad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2.zip
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/readfuncs.c')
-rw-r--r--src/backend/nodes/readfuncs.c31
1 files changed, 7 insertions, 24 deletions
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))