From 62e29fe2e748933bfd8ab1429518ee7b5a8974a7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 8 Aug 2000 15:43:12 +0000 Subject: Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist' from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules. --- src/backend/nodes/makefuncs.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/backend/nodes/makefuncs.c') diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index 4bad2008d77..45e1c03738c 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.21 2000/04/12 17:15:16 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.22 2000/08/08 15:41:24 tgl Exp $ * * NOTES * Creator functions in POSTGRES 4.2 are generated automatically. Most of @@ -29,17 +29,14 @@ Oper * makeOper(Oid opno, Oid opid, - Oid opresulttype, - int opsize, - FunctionCachePtr op_fcache) + Oid opresulttype) { Oper *oper = makeNode(Oper); oper->opno = opno; oper->opid = opid; oper->opresulttype = opresulttype; - oper->opsize = opsize; - oper->op_fcache = op_fcache; + oper->op_fcache = NULL; return oper; } @@ -99,8 +96,6 @@ makeResdom(AttrNumber resno, Oid restype, int32 restypmod, char *resname, - Index reskey, - Oid reskeyop, bool resjunk) { Resdom *resdom = makeNode(Resdom); @@ -111,12 +106,14 @@ makeResdom(AttrNumber resno, resdom->resname = resname; /* - * For historical reasons, ressortgroupref defaults to 0 while - * reskey/reskeyop are passed in explicitly. This is pretty silly. + * We always set the sorting/grouping fields to 0. If the caller wants + * to change them he must do so explicitly. Few if any callers should + * be doing that, so omitting these arguments reduces the chance of error. */ resdom->ressortgroupref = 0; - resdom->reskey = reskey; - resdom->reskeyop = reskeyop; + resdom->reskey = 0; + resdom->reskeyop = InvalidOid; + resdom->resjunk = resjunk; return resdom; } -- cgit v1.2.3