mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-06 08:57:39 +08:00
extensions to support our historical behavior. An aggregate belongs to the closest query level of any of the variables in its argument, or the current query level if there are no variables (e.g., COUNT(*)). The implementation involves adding an agglevelsup field to Aggref, and treating outer aggregates like outer variables at planning time.
23 lines
655 B
C
23 lines
655 B
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* parse_agg.h
|
|
* handle aggregates in parser
|
|
*
|
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: parse_agg.h,v 1.26 2003/06/06 15:04:03 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef PARSE_AGG_H
|
|
#define PARSE_AGG_H
|
|
|
|
#include "parser/parse_node.h"
|
|
|
|
extern void transformAggregateCall(ParseState *pstate, Aggref *agg);
|
|
|
|
extern void parseCheckAggregates(ParseState *pstate, Query *qry);
|
|
|
|
#endif /* PARSE_AGG_H */
|