Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / brin.h
blob4e2be13cd61656b7b87e8ccf01789ba441b419ce
1 /*
2 * AM-callable functions for BRIN indexes
4 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
5 * Portions Copyright (c) 1994, Regents of the University of California
7 * IDENTIFICATION
8 * src/include/access/brin.h
9 */
10 #ifndef BRIN_H
11 #define BRIN_H
13 #include "nodes/execnodes.h"
14 #include "utils/relcache.h"
18 * Storage type for BRIN's reloptions
20 typedef struct BrinOptions
22 int32 vl_len_; /* varlena header (do not touch directly!) */
23 BlockNumber pagesPerRange;
24 bool autosummarize;
25 } BrinOptions;
29 * BrinStatsData represents stats data for planner use
31 typedef struct BrinStatsData
33 BlockNumber pagesPerRange;
34 BlockNumber revmapNumPages;
35 } BrinStatsData;
38 #define BRIN_DEFAULT_PAGES_PER_RANGE 128
39 #define BrinGetPagesPerRange(relation) \
40 (AssertMacro(relation->rd_rel->relkind == RELKIND_INDEX && \
41 relation->rd_rel->relam == BRIN_AM_OID), \
42 (relation)->rd_options ? \
43 ((BrinOptions *) (relation)->rd_options)->pagesPerRange : \
44 BRIN_DEFAULT_PAGES_PER_RANGE)
45 #define BrinGetAutoSummarize(relation) \
46 (AssertMacro(relation->rd_rel->relkind == RELKIND_INDEX && \
47 relation->rd_rel->relam == BRIN_AM_OID), \
48 (relation)->rd_options ? \
49 ((BrinOptions *) (relation)->rd_options)->autosummarize : \
50 false)
53 extern void brinGetStats(Relation index, BrinStatsData *stats);
55 #endif /* BRIN_H */