2 * AM-callable functions for BRIN indexes
4 * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
5 * Portions Copyright (c) 1994, Regents of the University of California
8 * src/include/access/brin.h
14 #include "nodes/execnodes.h"
15 #include "utils/relcache.h"
19 * Storage type for BRIN's reloptions
21 typedef struct BrinOptions
23 int32 vl_len_; /* varlena header (do not touch directly!) */
24 BlockNumber pagesPerRange;
30 * BrinStatsData represents stats data for planner use
32 typedef struct BrinStatsData
34 BlockNumber pagesPerRange;
35 BlockNumber revmapNumPages;
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 : \
50 extern void brinGetStats(Relation index, BrinStatsData *stats);