PostgreSQL Source Code  git master
brin.h
Go to the documentation of this file.
1 /*
2  * AM-callable functions for BRIN indexes
3  *
4  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
5  * Portions Copyright (c) 1994, Regents of the University of California
6  *
7  * IDENTIFICATION
8  * src/include/access/brin.h
9  */
10 #ifndef BRIN_H
11 #define BRIN_H
12 
13 #include "fmgr.h"
14 #include "nodes/execnodes.h"
15 #include "utils/relcache.h"
16 
17 
18 /*
19  * Storage type for BRIN's reloptions
20  */
21 typedef struct BrinOptions
22 {
23  int32 vl_len_; /* varlena header (do not touch directly!) */
26 } BrinOptions;
27 
28 
29 /*
30  * BrinStatsData represents stats data for planner use
31  */
32 typedef struct BrinStatsData
33 {
37 
38 
39 #define BRIN_DEFAULT_PAGES_PER_RANGE 128
40 #define BrinGetPagesPerRange(relation) \
41  ((relation)->rd_options ? \
42  ((BrinOptions *) (relation)->rd_options)->pagesPerRange : \
43  BRIN_DEFAULT_PAGES_PER_RANGE)
44 #define BrinGetAutoSummarize(relation) \
45  ((relation)->rd_options ? \
46  ((BrinOptions *) (relation)->rd_options)->autosummarize : \
47  false)
48 
49 
50 extern void brinGetStats(Relation index, BrinStatsData *stats);
51 
52 #endif /* BRIN_H */
struct BrinStatsData BrinStatsData
bool autosummarize
Definition: brin.h:25
uint32 BlockNumber
Definition: block.h:31
BlockNumber pagesPerRange
Definition: brin.h:24
signed int int32
Definition: c.h:284
Definition: type.h:89
int32 vl_len_
Definition: brin.h:23
BlockNumber pagesPerRange
Definition: brin.h:34
struct BrinOptions BrinOptions
void brinGetStats(Relation index, BrinStatsData *stats)
Definition: brin.c:1066
BlockNumber revmapNumPages
Definition: brin.h:35