1997-11-25 22:07:18 +00:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* parse_agg.h
|
2008-12-28 18:54:01 +00:00
|
|
|
* handle aggregates and window functions in parser
|
1997-11-25 22:07:18 +00:00
|
|
|
*
|
2009-01-01 17:24:05 +00:00
|
|
|
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
2000-01-26 05:58:53 +00:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1997-11-25 22:07:18 +00:00
|
|
|
*
|
2009-12-15 17:57:48 +00:00
|
|
|
* $PostgreSQL: pgsql/src/include/parser/parse_agg.h,v 1.40 2009/12/15 17:57:47 tgl Exp $
|
1997-11-25 22:07:18 +00:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PARSE_AGG_H
|
|
|
|
#define PARSE_AGG_H
|
|
|
|
|
1999-07-15 23:04:24 +00:00
|
|
|
#include "parser/parse_node.h"
|
1997-11-25 22:07:18 +00:00
|
|
|
|
2009-12-15 17:57:48 +00:00
|
|
|
extern void transformAggregateCall(ParseState *pstate, Aggref *agg,
|
|
|
|
bool agg_distinct);
|
2008-12-28 18:54:01 +00:00
|
|
|
extern void transformWindowFuncCall(ParseState *pstate, WindowFunc *wfunc,
|
2009-06-11 14:49:15 +00:00
|
|
|
WindowDef *windef);
|
2003-06-06 15:04:03 +00:00
|
|
|
|
2003-01-17 03:25:04 +00:00
|
|
|
extern void parseCheckAggregates(ParseState *pstate, Query *qry);
|
2008-12-28 18:54:01 +00:00
|
|
|
extern void parseCheckWindowFuncs(ParseState *pstate, Query *qry);
|
2001-10-28 06:26:15 +00:00
|
|
|
|
2006-07-27 19:52:07 +00:00
|
|
|
extern void build_aggregate_fnexprs(Oid *agg_input_types,
|
|
|
|
int agg_num_inputs,
|
2003-08-04 00:43:34 +00:00
|
|
|
Oid agg_state_type,
|
|
|
|
Oid agg_result_type,
|
|
|
|
Oid transfn_oid,
|
|
|
|
Oid finalfn_oid,
|
|
|
|
Expr **transfnexpr,
|
|
|
|
Expr **finalfnexpr);
|
2003-07-01 19:10:53 +00:00
|
|
|
|
2001-11-05 17:46:40 +00:00
|
|
|
#endif /* PARSE_AGG_H */
|