1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Get rid of long-since-vestigial Iter node type, in favor of adding a

returns-set boolean field in Func and Oper nodes.  This allows cleaner,
more reliable tests for expressions returning sets in the planner and
parser.  For example, a WHERE clause returning a set is now detected
and complained of in the parser, not only at runtime.
This commit is contained in:
Tom Lane
2002-05-12 23:43:04 +00:00
parent f9e4f611a1
commit 3389a110d4
33 changed files with 297 additions and 676 deletions

View File

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.183 2002/05/12 20:10:02 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.184 2002/05/12 23:43:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -764,6 +764,7 @@ _copyOper(Oper *from)
newnode->opno = from->opno;
newnode->opid = from->opid;
newnode->opresulttype = from->opresulttype;
newnode->opretset = from->opretset;
/* Do not copy the run-time state, if any */
newnode->op_fcache = NULL;
@ -852,7 +853,8 @@ _copyFunc(Func *from)
* copy remainder of node
*/
newnode->funcid = from->funcid;
newnode->functype = from->functype;
newnode->funcresulttype = from->funcresulttype;
newnode->funcretset = from->funcretset;
/* Do not copy the run-time state, if any */
newnode->func_fcache = NULL;
@ -1433,17 +1435,6 @@ _copyJoinInfo(JoinInfo *from)
return newnode;
}
static Iter *
_copyIter(Iter *from)
{
Iter *newnode = makeNode(Iter);
Node_Copy(from, newnode, iterexpr);
newnode->itertype = from->itertype;
return newnode;
}
static Stream *
_copyStream(Stream *from)
{
@ -2729,9 +2720,6 @@ copyObject(void *from)
case T_ArrayRef:
retval = _copyArrayRef(from);
break;
case T_Iter:
retval = _copyIter(from);
break;
case T_FieldSelect:
retval = _copyFieldSelect(from);
break;