mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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 ...
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.157 2002/04/28 19:54:28 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.158 2002/05/12 20:10:03 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||
@ -551,6 +551,18 @@ _outSubqueryScan(StringInfo str, SubqueryScan *node)
|
||||
_outNode(str, node->subplan);
|
||||
}
|
||||
|
||||
/*
|
||||
* FunctionScan is a subclass of Scan
|
||||
*/
|
||||
static void
|
||||
_outFunctionScan(StringInfo str, FunctionScan *node)
|
||||
{
|
||||
appendStringInfo(str, " FUNCTIONSCAN ");
|
||||
_outPlanInfo(str, (Plan *) node);
|
||||
|
||||
appendStringInfo(str, " :scanrelid %u ", node->scan.scanrelid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Material is a subclass of Plan
|
||||
*/
|
||||
@ -980,6 +992,10 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
|
||||
appendStringInfo(str, ":subquery ");
|
||||
_outNode(str, node->subquery);
|
||||
break;
|
||||
case RTE_FUNCTION:
|
||||
appendStringInfo(str, ":funcexpr ");
|
||||
_outNode(str, node->funcexpr);
|
||||
break;
|
||||
case RTE_JOIN:
|
||||
appendStringInfo(str, ":jointype %d :joinaliasvars ",
|
||||
(int) node->jointype);
|
||||
@ -1598,6 +1614,9 @@ _outNode(StringInfo str, void *obj)
|
||||
case T_SubqueryScan:
|
||||
_outSubqueryScan(str, obj);
|
||||
break;
|
||||
case T_FunctionScan:
|
||||
_outFunctionScan(str, obj);
|
||||
break;
|
||||
case T_Material:
|
||||
_outMaterial(str, obj);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user