mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.175 2002/04/28 19:54:28 tgl Exp $
|
||||
* $Id: parsenodes.h,v 1.176 2002/05/12 20:10:04 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -387,6 +387,16 @@ typedef struct RangeSubselect
|
||||
Alias *alias; /* table alias & optional column aliases */
|
||||
} RangeSubselect;
|
||||
|
||||
/*
|
||||
* RangeFunction - function call appearing in a FROM clause
|
||||
*/
|
||||
typedef struct RangeFunction
|
||||
{
|
||||
NodeTag type;
|
||||
Node *funccallnode; /* untransformed function call tree */
|
||||
Alias *alias; /* table alias & optional column aliases */
|
||||
} RangeFunction;
|
||||
|
||||
/*
|
||||
* IndexElem - index parameters (used in CREATE INDEX)
|
||||
*
|
||||
@@ -482,7 +492,8 @@ typedef enum RTEKind
|
||||
RTE_RELATION, /* ordinary relation reference */
|
||||
RTE_SUBQUERY, /* subquery in FROM */
|
||||
RTE_JOIN, /* join */
|
||||
RTE_SPECIAL /* special rule relation (NEW or OLD) */
|
||||
RTE_SPECIAL, /* special rule relation (NEW or OLD) */
|
||||
RTE_FUNCTION /* function in FROM */
|
||||
} RTEKind;
|
||||
|
||||
typedef struct RangeTblEntry
|
||||
@@ -507,6 +518,11 @@ typedef struct RangeTblEntry
|
||||
*/
|
||||
Query *subquery; /* the sub-query */
|
||||
|
||||
/*
|
||||
* Fields valid for a function RTE (else NULL):
|
||||
*/
|
||||
Node *funcexpr; /* expression tree for func call */
|
||||
|
||||
/*
|
||||
* Fields valid for a join RTE (else NULL/zero):
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user