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/include/nodes/makefuncs.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/include/nodes/makefuncs.h') diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index 8d50f499718..52444d258b6 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/makefuncs.h,v 1.51 2004/12/31 22:03:34 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/nodes/makefuncs.h,v 1.52 2005/04/06 16:34:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -29,13 +29,12 @@ extern Var *makeVar(Index varno, int32 vartypmod, Index varlevelsup); -extern TargetEntry *makeTargetEntry(Resdom *resdom, Expr *expr); +extern TargetEntry *makeTargetEntry(Expr *expr, + AttrNumber resno, + char *resname, + bool resjunk); -extern Resdom *makeResdom(AttrNumber resno, - Oid restype, - int32 restypmod, - char *resname, - bool resjunk); +extern TargetEntry *flatCopyTargetEntry(TargetEntry *src_tle); extern Const *makeConst(Oid consttype, int constlen, -- cgit v1.2.3