Skip to content

Commit 782c16c

Browse files
committed
SQL-language functions are now callable in ordinary fmgr contexts ...
for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
1 parent 87523ab commit 782c16c

35 files changed

+886
-918
lines changed

src/backend/executor/execFlatten.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.12 2000/01/26 05:56:21 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.13 2000/08/24 03:29:03 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -36,11 +36,12 @@ static bool FjoinBumpOuterNodes(TargetEntry *tlist, ExprContext *econtext,
3636

3737
#endif
3838

39+
3940
Datum
4041
ExecEvalIter(Iter *iterNode,
4142
ExprContext *econtext,
42-
bool *resultIsNull,
43-
bool *iterIsDone)
43+
bool *isNull,
44+
ExprDoneCond *isDone)
4445
{
4546
Node *expression;
4647

@@ -52,14 +53,14 @@ ExecEvalIter(Iter *iterNode,
5253
* only worrying about postquel functions, c functions will come
5354
* later.
5455
*/
55-
return ExecEvalExpr(expression, econtext, resultIsNull, iterIsDone);
56+
return ExecEvalExpr(expression, econtext, isNull, isDone);
5657
}
5758

5859
void
5960
ExecEvalFjoin(TargetEntry *tlist,
6061
ExprContext *econtext,
6162
bool *isNullVect,
62-
bool *fj_isDone)
63+
ExprDoneCond *fj_isDone)
6364
{
6465

6566
#ifdef SETS_FIXED
@@ -72,7 +73,7 @@ ExecEvalFjoin(TargetEntry *tlist,
7273
BoolPtr alwaysDone = fjNode->fj_alwaysDone;
7374

7475
if (fj_isDone)
75-
*fj_isDone = false;
76+
*fj_isDone = ExprMultipleResult;
7677

7778
/*
7879
* For the next tuple produced by the plan, we need to re-initialize

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy