mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Support window functions a la SQL:2008.
Hitoshi Harada, with some kibitzing from Heikki and Tom.
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/parser/parse_node.h,v 1.58 2008/10/08 01:14:44 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/parser/parse_node.h,v 1.59 2008/12/28 18:54:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -57,6 +57,12 @@
|
||||
* p_future_ctes: list of CommonTableExprs (WITH items) that are not yet
|
||||
* visible due to scope rules. This is used to help improve error messages.
|
||||
*
|
||||
* p_windowdefs: list of WindowDefs representing WINDOW and OVER clauses.
|
||||
* We collect these while transforming expressions and then transform them
|
||||
* afterwards (so that any resjunk tlist items needed for the sort/group
|
||||
* clauses end up at the end of the query tlist). A WindowDef's location in
|
||||
* this list, counting from 1, is the winref number to use to reference it.
|
||||
*
|
||||
* p_paramtypes: an array of p_numparams type OIDs for $n parameter symbols
|
||||
* (zeroth entry in array corresponds to $1). If p_variableparams is true, the
|
||||
* set of param types is not predetermined; in that case, a zero array entry
|
||||
@@ -77,6 +83,7 @@ typedef struct ParseState
|
||||
List *p_varnamespace; /* current namespace for columns */
|
||||
List *p_ctenamespace; /* current namespace for common table exprs */
|
||||
List *p_future_ctes; /* common table exprs not yet in namespace */
|
||||
List *p_windowdefs; /* raw representations of window clauses */
|
||||
Oid *p_paramtypes; /* OIDs of types for $n parameter symbols */
|
||||
int p_numparams; /* allocated size of p_paramtypes[] */
|
||||
int p_next_resno; /* next targetlist resno to assign */
|
||||
@@ -84,6 +91,7 @@ typedef struct ParseState
|
||||
Node *p_value_substitute; /* what to replace VALUE with, if any */
|
||||
bool p_variableparams;
|
||||
bool p_hasAggs;
|
||||
bool p_hasWindowFuncs;
|
||||
bool p_hasSubLinks;
|
||||
bool p_is_insert;
|
||||
bool p_is_update;
|
||||
|
Reference in New Issue
Block a user