| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef GIN_H |
| #define GIN_H |
|
|
| #include "access/xlogreader.h" |
| #include "lib/stringinfo.h" |
| #include "storage/block.h" |
| #include "utils/relcache.h" |
|
|
|
|
| |
| |
| |
| #define GIN_COMPARE_PROC 1 |
| #define GIN_EXTRACTVALUE_PROC 2 |
| #define GIN_EXTRACTQUERY_PROC 3 |
| #define GIN_CONSISTENT_PROC 4 |
| #define GIN_COMPARE_PARTIAL_PROC 5 |
| #define GIN_TRICONSISTENT_PROC 6 |
| #define GIN_OPTIONS_PROC 7 |
| #define GINNProcs 7 |
|
|
| |
| |
| |
| #define GIN_SEARCH_MODE_DEFAULT 0 |
| #define GIN_SEARCH_MODE_INCLUDE_EMPTY 1 |
| #define GIN_SEARCH_MODE_ALL 2 |
| #define GIN_SEARCH_MODE_EVERYTHING 3 |
|
|
| |
| |
| |
| typedef struct GinStatsData |
| { |
| BlockNumber nPendingPages; |
| BlockNumber nTotalPages; |
| BlockNumber nEntryPages; |
| BlockNumber nDataPages; |
| int64 nEntries; |
| int32 ginVersion; |
| } GinStatsData; |
|
|
| |
| |
| |
| |
| |
| |
| typedef char GinTernaryValue; |
|
|
| StaticAssertDecl(sizeof(GinTernaryValue) == sizeof(bool), |
| "sizes of GinTernaryValue and bool are not equal"); |
|
|
| #define GIN_FALSE 0 |
| #define GIN_TRUE 1 |
| #define GIN_MAYBE 2 |
| |
|
|
| static inline GinTernaryValue |
| DatumGetGinTernaryValue(Datum X) |
| { |
| return (GinTernaryValue) X; |
| } |
|
|
| static inline Datum |
| GinTernaryValueGetDatum(GinTernaryValue X) |
| { |
| return (Datum) X; |
| } |
|
|
| #define PG_RETURN_GIN_TERNARY_VALUE(x) return GinTernaryValueGetDatum(x) |
|
|
| |
| extern PGDLLIMPORT int GinFuzzySearchLimit; |
| extern PGDLLIMPORT int gin_pending_list_limit; |
|
|
| |
| extern void ginGetStats(Relation index, GinStatsData *stats); |
| extern void ginUpdateStats(Relation index, const GinStatsData *stats, |
| bool is_build); |
|
|
| #endif |
|
|