From f9e4f611a18f64fd9106a72ec9af9e2220075780 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 12 May 2002 20:10:05 +0000 Subject: First pass at set-returning-functions in FROM, by Joe Conway with some kibitzing from Tom Lane. Not everything works yet, and there's no documentation or regression test, but let's commit this so Joe doesn't need to cope with tracking changes in so many files ... --- src/backend/executor/execProcnode.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/execProcnode.c') diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index 5cbd2ea5622..c0f005f1e67 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.28 2001/10/25 05:49:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.29 2002/05/12 20:10:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -96,6 +96,7 @@ #include "executor/nodeSort.h" #include "executor/nodeSubplan.h" #include "executor/nodeSubqueryscan.h" +#include "executor/nodeFunctionscan.h" #include "executor/nodeUnique.h" #include "miscadmin.h" #include "tcop/tcopprot.h" @@ -168,6 +169,11 @@ ExecInitNode(Plan *node, EState *estate, Plan *parent) parent); break; + case T_FunctionScan: + result = ExecInitFunctionScan((FunctionScan *) node, estate, + parent); + break; + /* * join nodes */ @@ -297,6 +303,10 @@ ExecProcNode(Plan *node, Plan *parent) result = ExecSubqueryScan((SubqueryScan *) node); break; + case T_FunctionScan: + result = ExecFunctionScan((FunctionScan *) node); + break; + /* * join nodes */ @@ -392,6 +402,9 @@ ExecCountSlotsNode(Plan *node) case T_SubqueryScan: return ExecCountSlotsSubqueryScan((SubqueryScan *) node); + case T_FunctionScan: + return ExecCountSlotsFunctionScan((FunctionScan *) node); + /* * join nodes */ @@ -503,6 +516,10 @@ ExecEndNode(Plan *node, Plan *parent) ExecEndSubqueryScan((SubqueryScan *) node); break; + case T_FunctionScan: + ExecEndFunctionScan((FunctionScan *) node); + break; + /* * join nodes */ @@ -640,6 +657,14 @@ ExecGetTupType(Plan *node) } break; + case T_FunctionScan: + { + CommonScanState *scanstate = ((FunctionScan *) node)->scan.scanstate; + + slot = scanstate->cstate.cs_ResultTupleSlot; + } + break; + case T_Material: { MaterialState *matstate = ((Material *) node)->matstate; -- cgit v1.2.3