PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_aggregate.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_aggregate.h
4  * definition of the system "aggregate" relation (pg_aggregate)
5  * along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/catalog/pg_aggregate.h
12  *
13  * NOTES
14  * the genbki.pl script reads this file and generates .bki
15  * information from the DATA() statements.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PG_AGGREGATE_H
20 #define PG_AGGREGATE_H
21 
22 #include "catalog/genbki.h"
23 #include "catalog/objectaddress.h"
24 #include "nodes/pg_list.h"
25 
26 /* ----------------------------------------------------------------
27  * pg_aggregate definition.
28  *
29  * cpp turns this into typedef struct FormData_pg_aggregate
30  *
31  * aggfnoid pg_proc OID of the aggregate itself
32  * aggkind aggregate kind, see AGGKIND_ categories below
33  * aggnumdirectargs number of arguments that are "direct" arguments
34  * aggtransfn transition function
35  * aggfinalfn final function (0 if none)
36  * aggcombinefn combine function (0 if none)
37  * aggserialfn function to convert transtype to bytea (0 if none)
38  * aggdeserialfn function to convert bytea to transtype (0 if none)
39  * aggmtransfn forward function for moving-aggregate mode (0 if none)
40  * aggminvtransfn inverse function for moving-aggregate mode (0 if none)
41  * aggmfinalfn final function for moving-aggregate mode (0 if none)
42  * aggfinalextra true to pass extra dummy arguments to aggfinalfn
43  * aggmfinalextra true to pass extra dummy arguments to aggmfinalfn
44  * aggsortop associated sort operator (0 if none)
45  * aggtranstype type of aggregate's transition (state) data
46  * aggtransspace estimated size of state data (0 for default estimate)
47  * aggmtranstype type of moving-aggregate state data (0 if none)
48  * aggmtransspace estimated size of moving-agg state (0 for default est)
49  * agginitval initial value for transition state (can be NULL)
50  * aggminitval initial value for moving-agg state (can be NULL)
51  * ----------------------------------------------------------------
52  */
53 #define AggregateRelationId 2600
54 
55 CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
56 {
57  regproc aggfnoid;
58  char aggkind;
59  int16 aggnumdirectargs;
60  regproc aggtransfn;
61  regproc aggfinalfn;
62  regproc aggcombinefn;
63  regproc aggserialfn;
64  regproc aggdeserialfn;
65  regproc aggmtransfn;
66  regproc aggminvtransfn;
67  regproc aggmfinalfn;
68  bool aggfinalextra;
69  bool aggmfinalextra;
70  Oid aggsortop;
71  Oid aggtranstype;
72  int32 aggtransspace;
73  Oid aggmtranstype;
74  int32 aggmtransspace;
75 
76 #ifdef CATALOG_VARLEN /* variable-length fields start here */
77  text agginitval;
78  text aggminitval;
79 #endif
81 
82 /* ----------------
83  * Form_pg_aggregate corresponds to a pointer to a tuple with
84  * the format of pg_aggregate relation.
85  * ----------------
86  */
88 
89 /* ----------------
90  * compiler constants for pg_aggregate
91  * ----------------
92  */
93 
94 #define Natts_pg_aggregate 20
95 #define Anum_pg_aggregate_aggfnoid 1
96 #define Anum_pg_aggregate_aggkind 2
97 #define Anum_pg_aggregate_aggnumdirectargs 3
98 #define Anum_pg_aggregate_aggtransfn 4
99 #define Anum_pg_aggregate_aggfinalfn 5
100 #define Anum_pg_aggregate_aggcombinefn 6
101 #define Anum_pg_aggregate_aggserialfn 7
102 #define Anum_pg_aggregate_aggdeserialfn 8
103 #define Anum_pg_aggregate_aggmtransfn 9
104 #define Anum_pg_aggregate_aggminvtransfn 10
105 #define Anum_pg_aggregate_aggmfinalfn 11
106 #define Anum_pg_aggregate_aggfinalextra 12
107 #define Anum_pg_aggregate_aggmfinalextra 13
108 #define Anum_pg_aggregate_aggsortop 14
109 #define Anum_pg_aggregate_aggtranstype 15
110 #define Anum_pg_aggregate_aggtransspace 16
111 #define Anum_pg_aggregate_aggmtranstype 17
112 #define Anum_pg_aggregate_aggmtransspace 18
113 #define Anum_pg_aggregate_agginitval 19
114 #define Anum_pg_aggregate_aggminitval 20
115 
116 /*
117  * Symbolic values for aggkind column. We distinguish normal aggregates
118  * from ordered-set aggregates (which have two sets of arguments, namely
119  * direct and aggregated arguments) and from hypothetical-set aggregates
120  * (which are a subclass of ordered-set aggregates in which the last
121  * direct arguments have to match up in number and datatypes with the
122  * aggregated arguments).
123  */
124 #define AGGKIND_NORMAL 'n'
125 #define AGGKIND_ORDERED_SET 'o'
126 #define AGGKIND_HYPOTHETICAL 'h'
127 
128 /* Use this macro to test for "ordered-set agg including hypothetical case" */
129 #define AGGKIND_IS_ORDERED_SET(kind) ((kind) != AGGKIND_NORMAL)
130 
131 
132 /* ----------------
133  * initial contents of pg_aggregate
134  * ---------------
135  */
136 
137 /* avg */
139 DATA(insert ( 2101 n 0 int4_avg_accum int8_avg int4_avg_combine - - int4_avg_accum int4_avg_accum_inv int8_avg f f 0 1016 0 1016 0 "{0,0}" "{0,0}" ));
140 DATA(insert ( 2102 n 0 int2_avg_accum int8_avg int4_avg_combine - - int2_avg_accum int2_avg_accum_inv int8_avg f f 0 1016 0 1016 0 "{0,0}" "{0,0}" ));
142 DATA(insert ( 2104 n 0 float4_accum float8_avg float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
143 DATA(insert ( 2105 n 0 float8_accum float8_avg float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
144 DATA(insert ( 2106 n 0 interval_accum interval_avg interval_combine - - interval_accum interval_accum_inv interval_avg f f 0 1187 0 1187 0 "{0 second,0 second}" "{0 second,0 second}" ));
145 
146 /* sum */
148 DATA(insert ( 2108 n 0 int4_sum - int8pl - - int4_avg_accum int4_avg_accum_inv int2int4_sum f f 0 20 0 1016 0 _null_ "{0,0}" ));
149 DATA(insert ( 2109 n 0 int2_sum - int8pl - - int2_avg_accum int2_avg_accum_inv int2int4_sum f f 0 20 0 1016 0 _null_ "{0,0}" ));
150 DATA(insert ( 2110 n 0 float4pl - float4pl - - - - - f f 0 700 0 0 0 _null_ _null_ ));
151 DATA(insert ( 2111 n 0 float8pl - float8pl - - - - - f f 0 701 0 0 0 _null_ _null_ ));
152 DATA(insert ( 2112 n 0 cash_pl - cash_pl - - cash_pl cash_mi - f f 0 790 0 790 0 _null_ _null_ ));
153 DATA(insert ( 2113 n 0 interval_pl - interval_pl - - interval_pl interval_mi - f f 0 1186 0 1186 0 _null_ _null_ ));
155 
156 /* max */
157 DATA(insert ( 2115 n 0 int8larger - int8larger - - - - - f f 413 20 0 0 0 _null_ _null_ ));
158 DATA(insert ( 2116 n 0 int4larger - int4larger - - - - - f f 521 23 0 0 0 _null_ _null_ ));
159 DATA(insert ( 2117 n 0 int2larger - int2larger - - - - - f f 520 21 0 0 0 _null_ _null_ ));
160 DATA(insert ( 2118 n 0 oidlarger - oidlarger - - - - - f f 610 26 0 0 0 _null_ _null_ ));
161 DATA(insert ( 2119 n 0 float4larger - float4larger - - - - - f f 623 700 0 0 0 _null_ _null_ ));
162 DATA(insert ( 2120 n 0 float8larger - float8larger - - - - - f f 674 701 0 0 0 _null_ _null_ ));
163 DATA(insert ( 2121 n 0 int4larger - int4larger - - - - - f f 563 702 0 0 0 _null_ _null_ ));
164 DATA(insert ( 2122 n 0 date_larger - date_larger - - - - - f f 1097 1082 0 0 0 _null_ _null_ ));
165 DATA(insert ( 2123 n 0 time_larger - time_larger - - - - - f f 1112 1083 0 0 0 _null_ _null_ ));
166 DATA(insert ( 2124 n 0 timetz_larger - timetz_larger - - - - - f f 1554 1266 0 0 0 _null_ _null_ ));
167 DATA(insert ( 2125 n 0 cashlarger - cashlarger - - - - - f f 903 790 0 0 0 _null_ _null_ ));
168 DATA(insert ( 2126 n 0 timestamp_larger - timestamp_larger - - - - - f f 2064 1114 0 0 0 _null_ _null_ ));
169 DATA(insert ( 2127 n 0 timestamptz_larger - timestamptz_larger - - - - - f f 1324 1184 0 0 0 _null_ _null_ ));
170 DATA(insert ( 2128 n 0 interval_larger - interval_larger - - - - - f f 1334 1186 0 0 0 _null_ _null_ ));
171 DATA(insert ( 2129 n 0 text_larger - text_larger - - - - - f f 666 25 0 0 0 _null_ _null_ ));
172 DATA(insert ( 2130 n 0 numeric_larger - numeric_larger - - - - - f f 1756 1700 0 0 0 _null_ _null_ ));
173 DATA(insert ( 2050 n 0 array_larger - array_larger - - - - - f f 1073 2277 0 0 0 _null_ _null_ ));
174 DATA(insert ( 2244 n 0 bpchar_larger - bpchar_larger - - - - - f f 1060 1042 0 0 0 _null_ _null_ ));
175 DATA(insert ( 2797 n 0 tidlarger - tidlarger - - - - - f f 2800 27 0 0 0 _null_ _null_ ));
176 DATA(insert ( 3526 n 0 enum_larger - enum_larger - - - - - f f 3519 3500 0 0 0 _null_ _null_ ));
177 DATA(insert ( 3564 n 0 network_larger - network_larger - - - - - f f 1205 869 0 0 0 _null_ _null_ ));
178 
179 /* min */
180 DATA(insert ( 2131 n 0 int8smaller - int8smaller - - - - - f f 412 20 0 0 0 _null_ _null_ ));
181 DATA(insert ( 2132 n 0 int4smaller - int4smaller - - - - - f f 97 23 0 0 0 _null_ _null_ ));
182 DATA(insert ( 2133 n 0 int2smaller - int2smaller - - - - - f f 95 21 0 0 0 _null_ _null_ ));
183 DATA(insert ( 2134 n 0 oidsmaller - oidsmaller - - - - - f f 609 26 0 0 0 _null_ _null_ ));
184 DATA(insert ( 2135 n 0 float4smaller - float4smaller - - - - - f f 622 700 0 0 0 _null_ _null_ ));
185 DATA(insert ( 2136 n 0 float8smaller - float8smaller - - - - - f f 672 701 0 0 0 _null_ _null_ ));
186 DATA(insert ( 2137 n 0 int4smaller - int4smaller - - - - - f f 562 702 0 0 0 _null_ _null_ ));
187 DATA(insert ( 2138 n 0 date_smaller - date_smaller - - - - - f f 1095 1082 0 0 0 _null_ _null_ ));
188 DATA(insert ( 2139 n 0 time_smaller - time_smaller - - - - - f f 1110 1083 0 0 0 _null_ _null_ ));
189 DATA(insert ( 2140 n 0 timetz_smaller - timetz_smaller - - - - - f f 1552 1266 0 0 0 _null_ _null_ ));
190 DATA(insert ( 2141 n 0 cashsmaller - cashsmaller - - - - - f f 902 790 0 0 0 _null_ _null_ ));
191 DATA(insert ( 2142 n 0 timestamp_smaller - timestamp_smaller - - - - - f f 2062 1114 0 0 0 _null_ _null_ ));
192 DATA(insert ( 2143 n 0 timestamptz_smaller - timestamptz_smaller - - - - - f f 1322 1184 0 0 0 _null_ _null_ ));
193 DATA(insert ( 2144 n 0 interval_smaller - interval_smaller - - - - - f f 1332 1186 0 0 0 _null_ _null_ ));
194 DATA(insert ( 2145 n 0 text_smaller - text_smaller - - - - - f f 664 25 0 0 0 _null_ _null_ ));
195 DATA(insert ( 2146 n 0 numeric_smaller - numeric_smaller - - - - - f f 1754 1700 0 0 0 _null_ _null_ ));
196 DATA(insert ( 2051 n 0 array_smaller - array_smaller - - - - - f f 1072 2277 0 0 0 _null_ _null_ ));
197 DATA(insert ( 2245 n 0 bpchar_smaller - bpchar_smaller - - - - - f f 1058 1042 0 0 0 _null_ _null_ ));
198 DATA(insert ( 2798 n 0 tidsmaller - tidsmaller - - - - - f f 2799 27 0 0 0 _null_ _null_ ));
199 DATA(insert ( 3527 n 0 enum_smaller - enum_smaller - - - - - f f 3518 3500 0 0 0 _null_ _null_ ));
200 DATA(insert ( 3565 n 0 network_smaller - network_smaller - - - - - f f 1203 869 0 0 0 _null_ _null_ ));
201 
202 /* count */
203 DATA(insert ( 2147 n 0 int8inc_any - int8pl - - int8inc_any int8dec_any - f f 0 20 0 20 0 "0" "0" ));
204 DATA(insert ( 2803 n 0 int8inc - int8pl - - int8inc int8dec - f f 0 20 0 20 0 "0" "0" ));
205 
206 /* var_pop */
210 DATA(insert ( 2721 n 0 float4_accum float8_var_pop float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
211 DATA(insert ( 2722 n 0 float8_accum float8_var_pop float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
213 
214 /* var_samp */
218 DATA(insert ( 2644 n 0 float4_accum float8_var_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
219 DATA(insert ( 2645 n 0 float8_accum float8_var_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
221 
222 /* variance: historical Postgres syntax for var_samp */
226 DATA(insert ( 2151 n 0 float4_accum float8_var_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
227 DATA(insert ( 2152 n 0 float8_accum float8_var_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
229 
230 /* stddev_pop */
234 DATA(insert ( 2727 n 0 float4_accum float8_stddev_pop float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
235 DATA(insert ( 2728 n 0 float8_accum float8_stddev_pop float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
237 
238 /* stddev_samp */
242 DATA(insert ( 2715 n 0 float4_accum float8_stddev_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
243 DATA(insert ( 2716 n 0 float8_accum float8_stddev_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
245 
246 /* stddev: historical Postgres syntax for stddev_samp */
250 DATA(insert ( 2157 n 0 float4_accum float8_stddev_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
251 DATA(insert ( 2158 n 0 float8_accum float8_stddev_samp float8_combine - - - - - f f 0 1022 0 0 0 "{0,0,0}" _null_ ));
253 
254 /* SQL2003 binary regression aggregates */
255 DATA(insert ( 2818 n 0 int8inc_float8_float8 - int8pl - - - - - f f 0 20 0 0 0 "0" _null_ ));
256 DATA(insert ( 2819 n 0 float8_regr_accum float8_regr_sxx float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
257 DATA(insert ( 2820 n 0 float8_regr_accum float8_regr_syy float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
258 DATA(insert ( 2821 n 0 float8_regr_accum float8_regr_sxy float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
259 DATA(insert ( 2822 n 0 float8_regr_accum float8_regr_avgx float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
260 DATA(insert ( 2823 n 0 float8_regr_accum float8_regr_avgy float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
261 DATA(insert ( 2824 n 0 float8_regr_accum float8_regr_r2 float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
262 DATA(insert ( 2825 n 0 float8_regr_accum float8_regr_slope float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
263 DATA(insert ( 2826 n 0 float8_regr_accum float8_regr_intercept float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
264 DATA(insert ( 2827 n 0 float8_regr_accum float8_covar_pop float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
265 DATA(insert ( 2828 n 0 float8_regr_accum float8_covar_samp float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
266 DATA(insert ( 2829 n 0 float8_regr_accum float8_corr float8_regr_combine - - - - - f f 0 1022 0 0 0 "{0,0,0,0,0,0}" _null_ ));
267 
268 /* boolean-and and boolean-or */
269 DATA(insert ( 2517 n 0 booland_statefunc - booland_statefunc - - bool_accum bool_accum_inv bool_alltrue f f 58 16 0 2281 16 _null_ _null_ ));
270 DATA(insert ( 2518 n 0 boolor_statefunc - boolor_statefunc - - bool_accum bool_accum_inv bool_anytrue f f 59 16 0 2281 16 _null_ _null_ ));
271 DATA(insert ( 2519 n 0 booland_statefunc - booland_statefunc - - bool_accum bool_accum_inv bool_alltrue f f 58 16 0 2281 16 _null_ _null_ ));
272 
273 /* bitwise integer */
274 DATA(insert ( 2236 n 0 int2and - int2and - - - - - f f 0 21 0 0 0 _null_ _null_ ));
275 DATA(insert ( 2237 n 0 int2or - int2or - - - - - f f 0 21 0 0 0 _null_ _null_ ));
276 DATA(insert ( 2238 n 0 int4and - int4and - - - - - f f 0 23 0 0 0 _null_ _null_ ));
277 DATA(insert ( 2239 n 0 int4or - int4or - - - - - f f 0 23 0 0 0 _null_ _null_ ));
278 DATA(insert ( 2240 n 0 int8and - int8and - - - - - f f 0 20 0 0 0 _null_ _null_ ));
279 DATA(insert ( 2241 n 0 int8or - int8or - - - - - f f 0 20 0 0 0 _null_ _null_ ));
280 DATA(insert ( 2242 n 0 bitand - bitand - - - - - f f 0 1560 0 0 0 _null_ _null_ ));
281 DATA(insert ( 2243 n 0 bitor - bitor - - - - - f f 0 1560 0 0 0 _null_ _null_ ));
282 
283 /* xml */
284 DATA(insert ( 2901 n 0 xmlconcat2 - - - - - - - f f 0 142 0 0 0 _null_ _null_ ));
285 
286 /* array */
287 DATA(insert ( 2335 n 0 array_agg_transfn array_agg_finalfn - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
288 DATA(insert ( 4053 n 0 array_agg_array_transfn array_agg_array_finalfn - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
289 
290 /* text */
291 DATA(insert ( 3538 n 0 string_agg_transfn string_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
292 
293 /* bytea */
294 DATA(insert ( 3545 n 0 bytea_string_agg_transfn bytea_string_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
295 
296 /* json */
297 DATA(insert ( 3175 n 0 json_agg_transfn json_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
298 DATA(insert ( 3197 n 0 json_object_agg_transfn json_object_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
299 
300 /* jsonb */
301 DATA(insert ( 3267 n 0 jsonb_agg_transfn jsonb_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
302 DATA(insert ( 3270 n 0 jsonb_object_agg_transfn jsonb_object_agg_finalfn - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
303 
304 /* ordered-set and hypothetical-set aggregates */
305 DATA(insert ( 3972 o 1 ordered_set_transition percentile_disc_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
306 DATA(insert ( 3974 o 1 ordered_set_transition percentile_cont_float8_final - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
307 DATA(insert ( 3976 o 1 ordered_set_transition percentile_cont_interval_final - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
308 DATA(insert ( 3978 o 1 ordered_set_transition percentile_disc_multi_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
309 DATA(insert ( 3980 o 1 ordered_set_transition percentile_cont_float8_multi_final - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
310 DATA(insert ( 3982 o 1 ordered_set_transition percentile_cont_interval_multi_final - - - - - - f f 0 2281 0 0 0 _null_ _null_ ));
311 DATA(insert ( 3984 o 0 ordered_set_transition mode_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
312 DATA(insert ( 3986 h 1 ordered_set_transition_multi rank_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
313 DATA(insert ( 3988 h 1 ordered_set_transition_multi percent_rank_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
314 DATA(insert ( 3990 h 1 ordered_set_transition_multi cume_dist_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
315 DATA(insert ( 3992 h 1 ordered_set_transition_multi dense_rank_final - - - - - - t f 0 2281 0 0 0 _null_ _null_ ));
316 
317 
318 /*
319  * prototypes for functions in pg_aggregate.c
320  */
321 extern ObjectAddress AggregateCreate(const char *aggName,
322  Oid aggNamespace,
323  char aggKind,
324  int numArgs,
325  int numDirectArgs,
326  oidvector *parameterTypes,
327  Datum allParameterTypes,
328  Datum parameterModes,
329  Datum parameterNames,
330  List *parameterDefaults,
331  Oid variadicArgType,
332  List *aggtransfnName,
333  List *aggfinalfnName,
334  List *aggcombinefnName,
335  List *aggserialfnName,
336  List *aggdeserialfnName,
337  List *aggmtransfnName,
338  List *aggminvtransfnName,
339  List *aggmfinalfnName,
340  bool finalfnExtraArgs,
341  bool mfinalfnExtraArgs,
342  List *aggsortopName,
343  Oid aggTransType,
344  int32 aggTransSpace,
345  Oid aggmTransType,
346  int32 aggmTransSpace,
347  const char *agginitval,
348  const char *aggminitval,
349  char proparallel);
350 
351 #endif /* PG_AGGREGATE_H */
Datum interval_smaller(PG_FUNCTION_ARGS)
Definition: timestamp.c:2981
Datum int8_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:3991
signed short int16
Definition: c.h:252
Datum float4pl(PG_FUNCTION_ARGS)
Definition: float.c:801
Datum int4_avg_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:5218
Datum interval_larger(PG_FUNCTION_ARGS)
Definition: timestamp.c:2996
Definition: c.h:474
Datum float8_stddev_pop(PG_FUNCTION_ARGS)
Definition: float.c:2712
Datum numeric_avg_combine(PG_FUNCTION_ARGS)
Definition: numeric.c:3510
Datum float8larger(PG_FUNCTION_ARGS)
Definition: float.c:760
Datum numeric_deserialize(PG_FUNCTION_ARGS)
Definition: numeric.c:3756
Datum int8_avg_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:4216
Datum float8_regr_syy(PG_FUNCTION_ARGS)
Definition: float.c:2949
Datum int4_avg_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:5131
Datum numeric_poly_stddev_pop(PG_FUNCTION_ARGS)
Definition: numeric.c:4910
Datum numeric_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:3402
Datum numeric_poly_sum(PG_FUNCTION_ARGS)
Definition: numeric.c:4528
Datum float4larger(PG_FUNCTION_ARGS)
Definition: float.c:693
Datum float8_regr_sxy(PG_FUNCTION_ARGS)
Definition: float.c:2978
Datum oidsmaller(PG_FUNCTION_ARGS)
Definition: oid.c:403
Datum percentile_cont_float8_final(PG_FUNCTION_ARGS)
Datum float8_var_samp(PG_FUNCTION_ARGS)
Definition: float.c:2683
CATALOG(pg_aggregate, 2600) BKI_WITHOUT_OIDS
Definition: pg_aggregate.h:55
Datum percentile_cont_interval_final(PG_FUNCTION_ARGS)
Datum array_agg_finalfn(PG_FUNCTION_ARGS)
Datum tidsmaller(PG_FUNCTION_ARGS)
Definition: tid.c:241
Datum percentile_disc_final(PG_FUNCTION_ARGS)
Datum array_agg_transfn(PG_FUNCTION_ARGS)
Datum bool_anytrue(PG_FUNCTION_ARGS)
Definition: bool.c:392
Datum int4and(PG_FUNCTION_ARGS)
Definition: int.c:1211
Datum int8pl(PG_FUNCTION_ARGS)
Definition: int8.c:513
Datum int8_avg_deserialize(PG_FUNCTION_ARGS)
Definition: numeric.c:4364
Datum bpchar_smaller(PG_FUNCTION_ARGS)
Definition: varchar.c:905
Datum int2and(PG_FUNCTION_ARGS)
Definition: int.c:1264
Datum float8_covar_pop(PG_FUNCTION_ARGS)
Definition: float.c:3046
Datum numeric_avg_serialize(PG_FUNCTION_ARGS)
Definition: numeric.c:3578
Datum numeric_var_samp(PG_FUNCTION_ARGS)
Definition: numeric.c:4733
Datum json_agg_finalfn(PG_FUNCTION_ARGS)
Definition: json.c:1953
Datum float8_regr_r2(PG_FUNCTION_ARGS)
Definition: float.c:3142
Datum bytea_string_agg_finalfn(PG_FUNCTION_ARGS)
Definition: varlena.c:484
Datum string_agg_transfn(PG_FUNCTION_ARGS)
Definition: varlena.c:4551
Datum float8_regr_sxx(PG_FUNCTION_ARGS)
Definition: float.c:2920
Datum numeric_var_pop(PG_FUNCTION_ARGS)
Definition: numeric.c:4767
unsigned int Oid
Definition: postgres_ext.h:31
Datum float8_avg(PG_FUNCTION_ARGS)
Definition: float.c:2634
Datum interval_mi(PG_FUNCTION_ARGS)
Definition: timestamp.c:3044
Datum ordered_set_transition(PG_FUNCTION_ARGS)
signed int int32
Definition: c.h:253
Datum float4_accum(PG_FUNCTION_ARGS)
Definition: float.c:2581
Datum int8larger(PG_FUNCTION_ARGS)
Definition: int8.c:794
#define BKI_WITHOUT_OIDS
Definition: genbki.h:28
Datum int8smaller(PG_FUNCTION_ARGS)
Definition: int8.c:806
Datum oidlarger(PG_FUNCTION_ARGS)
Definition: oid.c:394
Datum int4_sum(PG_FUNCTION_ARGS)
Definition: numeric.c:5000
Datum int8inc_float8_float8(PG_FUNCTION_ARGS)
Definition: int8.c:781
Datum time_larger(PG_FUNCTION_ARGS)
Definition: date.c:1512
Datum interval_pl(PG_FUNCTION_ARGS)
Definition: timestamp.c:3010
Datum float8_regr_slope(PG_FUNCTION_ARGS)
Definition: float.c:3186
Datum numeric_combine(PG_FUNCTION_ARGS)
Definition: numeric.c:3422
Datum string_agg_finalfn(PG_FUNCTION_ARGS)
Definition: varlena.c:4577
Datum float8pl(PG_FUNCTION_ARGS)
Definition: float.c:870
Datum jsonb_object_agg_finalfn(PG_FUNCTION_ARGS)
Definition: jsonb.c:1912
Datum cashsmaller(PG_FUNCTION_ARGS)
Definition: cash.c:928
Datum jsonb_object_agg_transfn(PG_FUNCTION_ARGS)
Definition: jsonb.c:1716
Datum int8and(PG_FUNCTION_ARGS)
Definition: int8.c:1222
ObjectAddress AggregateCreate(const char *aggName, Oid aggNamespace, char aggKind, int numArgs, int numDirectArgs, oidvector *parameterTypes, Datum allParameterTypes, Datum parameterModes, Datum parameterNames, List *parameterDefaults, Oid variadicArgType, List *aggtransfnName, List *aggfinalfnName, List *aggcombinefnName, List *aggserialfnName, List *aggdeserialfnName, List *aggmtransfnName, List *aggminvtransfnName, List *aggmfinalfnName, bool finalfnExtraArgs, bool mfinalfnExtraArgs, List *aggsortopName, Oid aggTransType, int32 aggTransSpace, Oid aggmTransType, int32 aggmTransSpace, const char *agginitval, const char *aggminitval, char proparallel)
Definition: pg_aggregate.c:47
Datum timestamp_smaller(PG_FUNCTION_ARGS)
Definition: timestamp.c:2524
Datum int8_avg_combine(PG_FUNCTION_ARGS)
Definition: numeric.c:4247
Datum int2smaller(PG_FUNCTION_ARGS)
Definition: int.c:1173
Datum int4larger(PG_FUNCTION_ARGS)
Definition: int.c:1182
Datum bpchar_larger(PG_FUNCTION_ARGS)
Definition: varchar.c:887
Datum date_larger(PG_FUNCTION_ARGS)
Definition: date.c:486
Datum text_larger(PG_FUNCTION_ARGS)
Definition: varlena.c:2442
Datum numeric_stddev_pop(PG_FUNCTION_ARGS)
Definition: numeric.c:4784
Datum text_smaller(PG_FUNCTION_ARGS)
Definition: varlena.c:2454
Datum int2_avg_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:5103
Datum timestamp_larger(PG_FUNCTION_ARGS)
Definition: timestamp.c:2539
Datum int8_avg_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:4498
Datum float8_regr_combine(PG_FUNCTION_ARGS)
Definition: float.c:2865
FormData_pg_aggregate
Definition: pg_aggregate.h:80
Datum int8inc(PG_FUNCTION_ARGS)
Definition: int8.c:677
Datum network_smaller(PG_FUNCTION_ARGS)
Definition: network.c:453
Datum interval_accum_inv(PG_FUNCTION_ARGS)
Definition: timestamp.c:3307
Datum int2_avg_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:5190
Datum int8_avg(PG_FUNCTION_ARGS)
Definition: numeric.c:5246
Datum array_agg_array_transfn(PG_FUNCTION_ARGS)
Datum cash_pl(PG_FUNCTION_ARGS)
Definition: cash.c:610
Datum mode_final(PG_FUNCTION_ARGS)
Datum numeric_larger(PG_FUNCTION_ARGS)
Definition: numeric.c:2544
Datum percentile_cont_interval_multi_final(PG_FUNCTION_ARGS)
Datum float8_covar_samp(PG_FUNCTION_ARGS)
Definition: float.c:3074
Datum numeric_avg(PG_FUNCTION_ARGS)
Definition: numeric.c:4587
Datum enum_larger(PG_FUNCTION_ARGS)
Definition: enum.c:379
Datum float8_regr_intercept(PG_FUNCTION_ARGS)
Definition: float.c:3221
Datum percentile_disc_multi_final(PG_FUNCTION_ARGS)
Datum int8_avg_serialize(PG_FUNCTION_ARGS)
Definition: numeric.c:4307
Datum numeric_poly_stddev_samp(PG_FUNCTION_ARGS)
Definition: numeric.c:4868
Datum numeric_serialize(PG_FUNCTION_ARGS)
Definition: numeric.c:3689
Datum json_object_agg_finalfn(PG_FUNCTION_ARGS)
Definition: json.c:2069
Datum int8dec(PG_FUNCTION_ARGS)
Definition: int8.c:721
Datum numeric_smaller(PG_FUNCTION_ARGS)
Definition: numeric.c:2522
Datum bool_accum(PG_FUNCTION_ARGS)
Definition: bool.c:335
Datum cash_mi(PG_FUNCTION_ARGS)
Definition: cash.c:626
Datum tidlarger(PG_FUNCTION_ARGS)
Definition: tid.c:232
Datum float8_regr_avgx(PG_FUNCTION_ARGS)
Definition: float.c:3008
Datum numeric_stddev_samp(PG_FUNCTION_ARGS)
Definition: numeric.c:4750
Datum int4_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:3964
Datum int8dec_any(PG_FUNCTION_ARGS)
Definition: int8.c:787
Datum enum_smaller(PG_FUNCTION_ARGS)
Definition: enum.c:370
Datum float8_accum(PG_FUNCTION_ARGS)
Definition: float.c:2530
uintptr_t Datum
Definition: postgres.h:374
Datum int4or(PG_FUNCTION_ARGS)
Definition: int.c:1220
Datum float4smaller(PG_FUNCTION_ARGS)
Definition: float.c:707
Datum date_smaller(PG_FUNCTION_ARGS)
Definition: date.c:495
Datum interval_avg(PG_FUNCTION_ARGS)
Definition: timestamp.c:3342
Datum numeric_poly_deserialize(PG_FUNCTION_ARGS)
Definition: numeric.c:4153
Datum int2_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:3937
Datum float8_var_pop(PG_FUNCTION_ARGS)
Definition: float.c:2654
Datum int4_avg_combine(PG_FUNCTION_ARGS)
Definition: numeric.c:5159
Datum jsonb_agg_transfn(PG_FUNCTION_ARGS)
Definition: jsonb.c:1563
Datum int2larger(PG_FUNCTION_ARGS)
Definition: int.c:1164
Datum float8_regr_accum(PG_FUNCTION_ARGS)
Definition: float.c:2786
Datum json_object_agg_transfn(PG_FUNCTION_ARGS)
Definition: json.c:1978
Datum int2_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:4412
Datum xmlconcat2(PG_FUNCTION_ARGS)
Definition: xml.c:527
Datum timetz_smaller(PG_FUNCTION_ARGS)
Definition: date.c:2231
Datum boolor_statefunc(PG_FUNCTION_ARGS)
Definition: bool.c:306
Datum int4_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:4442
FormData_pg_aggregate * Form_pg_aggregate
Definition: pg_aggregate.h:87
Datum cashlarger(PG_FUNCTION_ARGS)
Definition: cash.c:913
Datum float8smaller(PG_FUNCTION_ARGS)
Definition: float.c:774
Datum int2or(PG_FUNCTION_ARGS)
Definition: int.c:1273
Datum int2int4_sum(PG_FUNCTION_ARGS)
Definition: numeric.c:5275
Datum int8_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:4472
Datum int2_sum(PG_FUNCTION_ARGS)
Definition: numeric.c:4951
Datum array_larger(PG_FUNCTION_ARGS)
Definition: arrayfuncs.c:5521
Datum time_smaller(PG_FUNCTION_ARGS)
Definition: date.c:1521
Datum interval_combine(PG_FUNCTION_ARGS)
Definition: timestamp.c:3258
Datum json_agg_transfn(PG_FUNCTION_ARGS)
Definition: json.c:1877
Datum float8_corr(PG_FUNCTION_ARGS)
Definition: float.c:3102
Oid regproc
Definition: c.h:391
Datum bool_accum_inv(PG_FUNCTION_ARGS)
Definition: bool.c:356
Datum float8_combine(PG_FUNCTION_ARGS)
Definition: float.c:2494
Datum array_smaller(PG_FUNCTION_ARGS)
Definition: arrayfuncs.c:5530
Datum numeric_avg_accum(PG_FUNCTION_ARGS)
Definition: numeric.c:3490
Datum int8or(PG_FUNCTION_ARGS)
Definition: int8.c:1231
Datum bytea_string_agg_transfn(PG_FUNCTION_ARGS)
Definition: varlena.c:452
Datum numeric_poly_avg(PG_FUNCTION_ARGS)
Definition: numeric.c:4556
Datum float8_stddev_samp(PG_FUNCTION_ARGS)
Definition: float.c:2741
Datum network_larger(PG_FUNCTION_ARGS)
Definition: network.c:465
Datum numeric_poly_var_samp(PG_FUNCTION_ARGS)
Definition: numeric.c:4847
Definition: c.h:435
Datum int8inc_any(PG_FUNCTION_ARGS)
Definition: int8.c:775
Datum ordered_set_transition_multi(PG_FUNCTION_ARGS)
Datum numeric_avg_deserialize(PG_FUNCTION_ARGS)
Definition: numeric.c:3635
Datum numeric_poly_combine(PG_FUNCTION_ARGS)
Definition: numeric.c:4017
Datum interval_accum(PG_FUNCTION_ARGS)
Definition: timestamp.c:3223
Datum jsonb_agg_finalfn(PG_FUNCTION_ARGS)
Definition: jsonb.c:1681
Datum array_agg_array_finalfn(PG_FUNCTION_ARGS)
Datum int4smaller(PG_FUNCTION_ARGS)
Definition: int.c:1191
Datum numeric_accum_inv(PG_FUNCTION_ARGS)
Definition: numeric.c:3818
Datum numeric_sum(PG_FUNCTION_ARGS)
Definition: numeric.c:4614
Datum numeric_poly_var_pop(PG_FUNCTION_ARGS)
Definition: numeric.c:4889
Datum percentile_cont_float8_multi_final(PG_FUNCTION_ARGS)
Datum float8_regr_avgy(PG_FUNCTION_ARGS)
Definition: float.c:3027
DATA(insert(2100 n 0 int8_avg_accumnumeric_poly_avg int8_avg_combine int8_avg_serializeint8_avg_deserialize int8_avg_accum int8_avg_accum_inv numeric_poly_avg f f 0 2281 48 2281 48 _null_ _null_))
Datum numeric_poly_serialize(PG_FUNCTION_ARGS)
Definition: numeric.c:4082
Definition: pg_list.h:45
Datum timetz_larger(PG_FUNCTION_ARGS)
Definition: date.c:2217
Datum bool_alltrue(PG_FUNCTION_ARGS)
Definition: bool.c:377
Datum booland_statefunc(PG_FUNCTION_ARGS)
Definition: bool.c:294