mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Extend ExecMakeFunctionResult() to support set-returning functions that return
via a tuplestore instead of value-per-call. Refactor a few things to reduce ensuing code duplication with nodeFunctionscan.c. This represents the reasonably noncontroversial part of my proposed patch to switch SQL functions over to returning tuplestores. For the moment, SQL functions still do things the old way. However, this change enables PL SRFs to be called in targetlists (observe changes in plperl regression results).
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.149 2008/07/26 19:15:35 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.150 2008/10/28 22:02:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -176,16 +176,9 @@ extern Datum GetAttributeByNum(HeapTupleHeader tuple, AttrNumber attrno,
|
||||
bool *isNull);
|
||||
extern Datum GetAttributeByName(HeapTupleHeader tuple, const char *attname,
|
||||
bool *isNull);
|
||||
extern void init_fcache(Oid foid, FuncExprState *fcache,
|
||||
MemoryContext fcacheCxt);
|
||||
extern Datum ExecMakeFunctionResult(FuncExprState *fcache,
|
||||
ExprContext *econtext,
|
||||
bool *isNull,
|
||||
ExprDoneCond *isDone);
|
||||
extern Tuplestorestate *ExecMakeTableFunctionResult(ExprState *funcexpr,
|
||||
ExprContext *econtext,
|
||||
TupleDesc expectedDesc,
|
||||
TupleDesc *returnDesc);
|
||||
TupleDesc expectedDesc);
|
||||
extern Datum ExecEvalExprSwitchContext(ExprState *expression, ExprContext *econtext,
|
||||
bool *isNull, ExprDoneCond *isDone);
|
||||
extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
|
||||
|
Reference in New Issue
Block a user