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:
@ -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;
|
||||
|
Reference in New Issue
Block a user