diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-12 23:43:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-12 23:43:04 +0000 |
commit | 3389a110d40a505951e7c7babdfb8681173bb2ca (patch) | |
tree | 438acebac5cfd161cf920bcda6ad168affcb96a7 /src/backend/nodes/outfuncs.c | |
parent | f9e4f611a18f64fd9106a72ec9af9e2220075780 (diff) |
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.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 698beb5d999..8ee69d1a702 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -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)); } /* @@ -1247,13 +1250,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) { appendStringInfo(str, @@ -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; |