1/*-------------------------------------------------------------------------
2 *
3 * pg_aggregate_d.h
4 * Macro definitions for pg_aggregate
5 *
6 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * NOTES
10 * ******************************
11 * *** DO NOT EDIT THIS FILE! ***
12 * ******************************
13 *
14 * It has been GENERATED by src/backend/catalog/genbki.pl
15 *
16 *-------------------------------------------------------------------------
17 */
18#ifndef PG_AGGREGATE_D_H
19#define PG_AGGREGATE_D_H
20
21#define AggregateRelationId 2600
22
23#define Anum_pg_aggregate_aggfnoid 1
24#define Anum_pg_aggregate_aggkind 2
25#define Anum_pg_aggregate_aggnumdirectargs 3
26#define Anum_pg_aggregate_aggtransfn 4
27#define Anum_pg_aggregate_aggfinalfn 5
28#define Anum_pg_aggregate_aggcombinefn 6
29#define Anum_pg_aggregate_aggserialfn 7
30#define Anum_pg_aggregate_aggdeserialfn 8
31#define Anum_pg_aggregate_aggmtransfn 9
32#define Anum_pg_aggregate_aggminvtransfn 10
33#define Anum_pg_aggregate_aggmfinalfn 11
34#define Anum_pg_aggregate_aggfinalextra 12
35#define Anum_pg_aggregate_aggmfinalextra 13
36#define Anum_pg_aggregate_aggfinalmodify 14
37#define Anum_pg_aggregate_aggmfinalmodify 15
38#define Anum_pg_aggregate_aggsortop 16
39#define Anum_pg_aggregate_aggtranstype 17
40#define Anum_pg_aggregate_aggtransspace 18
41#define Anum_pg_aggregate_aggmtranstype 19
42#define Anum_pg_aggregate_aggmtransspace 20
43#define Anum_pg_aggregate_agginitval 21
44#define Anum_pg_aggregate_aggminitval 22
45
46#define Natts_pg_aggregate 22
47
48
49/*
50 * Symbolic values for aggkind column. We distinguish normal aggregates
51 * from ordered-set aggregates (which have two sets of arguments, namely
52 * direct and aggregated arguments) and from hypothetical-set aggregates
53 * (which are a subclass of ordered-set aggregates in which the last
54 * direct arguments have to match up in number and datatypes with the
55 * aggregated arguments).
56 */
57#define AGGKIND_NORMAL 'n'
58#define AGGKIND_ORDERED_SET 'o'
59#define AGGKIND_HYPOTHETICAL 'h'
60
61/* Use this macro to test for "ordered-set agg including hypothetical case" */
62#define AGGKIND_IS_ORDERED_SET(kind) ((kind) != AGGKIND_NORMAL)
63
64/*
65 * Symbolic values for aggfinalmodify and aggmfinalmodify columns.
66 * Preferably, finalfns do not modify the transition state value at all,
67 * but in some cases that would cost too much performance. We distinguish
68 * "pure read only" and "trashes it arbitrarily" cases, as well as the
69 * intermediate case where multiple finalfn calls are allowed but the
70 * transfn cannot be applied anymore after the first finalfn call.
71 */
72#define AGGMODIFY_READ_ONLY 'r'
73#define AGGMODIFY_SHAREABLE 's'
74#define AGGMODIFY_READ_WRITE 'w'
75
76
77#endif /* PG_AGGREGATE_D_H */
78