mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
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.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.124 2000/07/22 04:22:46 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.125 2000/08/08 15:41:26 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||
@ -757,6 +757,19 @@ _outSubLink(StringInfo str, SubLink *node)
|
||||
_outNode(str, node->subselect);
|
||||
}
|
||||
|
||||
/*
|
||||
* FieldSelect
|
||||
*/
|
||||
static void
|
||||
_outFieldSelect(StringInfo str, FieldSelect *node)
|
||||
{
|
||||
appendStringInfo(str, " FIELDSELECT :arg ");
|
||||
_outNode(str, node->arg);
|
||||
|
||||
appendStringInfo(str, " :fieldnum %d :resulttype %u :resulttypmod %d ",
|
||||
node->fieldnum, node->resulttype, node->resulttypmod);
|
||||
}
|
||||
|
||||
/*
|
||||
* RelabelType
|
||||
*/
|
||||
@ -802,19 +815,9 @@ _outArrayRef(StringInfo str, ArrayRef *node)
|
||||
static void
|
||||
_outFunc(StringInfo str, Func *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" FUNC :funcid %u :functype %u :funcisindex %s :funcsize %d ",
|
||||
appendStringInfo(str, " FUNC :funcid %u :functype %u ",
|
||||
node->funcid,
|
||||
node->functype,
|
||||
node->funcisindex ? "true" : "false",
|
||||
node->funcsize);
|
||||
|
||||
appendStringInfo(str, " :func_fcache @ 0x%x :func_tlist ",
|
||||
(int) node->func_fcache);
|
||||
_outNode(str, node->func_tlist);
|
||||
|
||||
appendStringInfo(str, " :func_planlist ");
|
||||
_outNode(str, node->func_planlist);
|
||||
node->functype);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -840,9 +843,7 @@ _outParam(StringInfo str, Param *node)
|
||||
node->paramkind,
|
||||
node->paramid);
|
||||
_outToken(str, node->paramname);
|
||||
appendStringInfo(str, " :paramtype %u :param_tlist ",
|
||||
node->paramtype);
|
||||
_outNode(str, node->param_tlist);
|
||||
appendStringInfo(str, " :paramtype %u ", node->paramtype);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1482,6 +1483,9 @@ _outNode(StringInfo str, void *obj)
|
||||
case T_SubLink:
|
||||
_outSubLink(str, obj);
|
||||
break;
|
||||
case T_FieldSelect:
|
||||
_outFieldSelect(str, obj);
|
||||
break;
|
||||
case T_RelabelType:
|
||||
_outRelabelType(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user