mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +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:
@ -5,7 +5,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.158 2002/05/12 20:10:03 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.159 2002/05/12 23:43:02 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||
@ -850,9 +850,11 @@ _outArrayRef(StringInfo str, ArrayRef *node)
|
||||
static void
|
||||
_outFunc(StringInfo str, Func *node)
|
||||
{
|
||||
appendStringInfo(str, " FUNC :funcid %u :functype %u ",
|
||||
appendStringInfo(str,
|
||||
" FUNC :funcid %u :funcresulttype %u :funcretset %s ",
|
||||
node->funcid,
|
||||
node->functype);
|
||||
node->funcresulttype,
|
||||
booltostr(node->funcretset));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -862,10 +864,11 @@ static void
|
||||
_outOper(StringInfo str, Oper *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" OPER :opno %u :opid %u :opresulttype %u ",
|
||||
" OPER :opno %u :opid %u :opresulttype %u :opretset %s ",
|
||||
node->opno,
|
||||
node->opid,
|
||||
node->opresulttype);
|
||||
node->opresulttype,
|
||||
booltostr(node->opretset));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1246,13 +1249,6 @@ _outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_outIter(StringInfo str, Iter *node)
|
||||
{
|
||||
appendStringInfo(str, " ITER :iterexpr ");
|
||||
_outNode(str, node->iterexpr);
|
||||
}
|
||||
|
||||
static void
|
||||
_outStream(StringInfo str, Stream *node)
|
||||
{
|
||||
@ -1731,9 +1727,6 @@ _outNode(StringInfo str, void *obj)
|
||||
case T_JoinInfo:
|
||||
_outJoinInfo(str, obj);
|
||||
break;
|
||||
case T_Iter:
|
||||
_outIter(str, obj);
|
||||
break;
|
||||
case T_Stream:
|
||||
_outStream(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user