LCOV - differential code coverage report
Current view: top level - src/include/access - gin.h (source / functions) Coverage Total Hit GNC ECB
Current: Differential Code Coverage HEAD vs 15 Lines: 100.0 % 4 4 4 4
Current Date: 2023-04-08 17:13:01 Functions: 100.0 % 2 2 2 2
Baseline: 15 Line coverage date bins:
Baseline Date: 2023-04-08 15:09:40 (180,240] days: 100.0 % 4 4 4
Legend: Lines: hit not hit Function coverage date bins:
(180,240] days: 100.0 % 2 2 2
(240..) days: 0.0 % 2 0 2

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*--------------------------------------------------------------------------
                                  2                 :  * gin.h
                                  3                 :  *    Public header file for Generalized Inverted Index access method.
                                  4                 :  *
                                  5                 :  *  Copyright (c) 2006-2023, PostgreSQL Global Development Group
                                  6                 :  *
                                  7                 :  *  src/include/access/gin.h
                                  8                 :  *--------------------------------------------------------------------------
                                  9                 :  */
                                 10                 : #ifndef GIN_H
                                 11                 : #define GIN_H
                                 12                 : 
                                 13                 : #include "access/xlogreader.h"
                                 14                 : #include "lib/stringinfo.h"
                                 15                 : #include "storage/block.h"
                                 16                 : #include "utils/relcache.h"
                                 17                 : 
                                 18                 : 
                                 19                 : /*
                                 20                 :  * amproc indexes for inverted indexes.
                                 21                 :  */
                                 22                 : #define GIN_COMPARE_PROC               1
                                 23                 : #define GIN_EXTRACTVALUE_PROC          2
                                 24                 : #define GIN_EXTRACTQUERY_PROC          3
                                 25                 : #define GIN_CONSISTENT_PROC            4
                                 26                 : #define GIN_COMPARE_PARTIAL_PROC       5
                                 27                 : #define GIN_TRICONSISTENT_PROC         6
                                 28                 : #define GIN_OPTIONS_PROC       7
                                 29                 : #define GINNProcs                      7
                                 30                 : 
                                 31                 : /*
                                 32                 :  * searchMode settings for extractQueryFn.
                                 33                 :  */
                                 34                 : #define GIN_SEARCH_MODE_DEFAULT         0
                                 35                 : #define GIN_SEARCH_MODE_INCLUDE_EMPTY   1
                                 36                 : #define GIN_SEARCH_MODE_ALL             2
                                 37                 : #define GIN_SEARCH_MODE_EVERYTHING      3   /* for internal use only */
                                 38                 : 
                                 39                 : /*
                                 40                 :  * GinStatsData represents stats data for planner use
                                 41                 :  */
                                 42                 : typedef struct GinStatsData
                                 43                 : {
                                 44                 :     BlockNumber nPendingPages;
                                 45                 :     BlockNumber nTotalPages;
                                 46                 :     BlockNumber nEntryPages;
                                 47                 :     BlockNumber nDataPages;
                                 48                 :     int64       nEntries;
                                 49                 :     int32       ginVersion;
                                 50                 : } GinStatsData;
                                 51                 : 
                                 52                 : /*
                                 53                 :  * A ternary value used by tri-consistent functions.
                                 54                 :  *
                                 55                 :  * This must be of the same size as a bool because some code will cast a
                                 56                 :  * pointer to a bool to a pointer to a GinTernaryValue.
                                 57                 :  */
                                 58                 : typedef char GinTernaryValue;
                                 59                 : 
                                 60                 : StaticAssertDecl(sizeof(GinTernaryValue) == sizeof(bool),
                                 61                 :                  "sizes of GinTernaryValue and bool are not equal");
                                 62                 : 
                                 63                 : #define GIN_FALSE       0       /* item is not present / does not match */
                                 64                 : #define GIN_TRUE        1       /* item is present / matches */
                                 65                 : #define GIN_MAYBE       2       /* don't know if item is present / don't know
                                 66                 :                                  * if matches */
                                 67                 : 
                                 68                 : static inline GinTernaryValue
  194 peter                      69 GNC      482948 : DatumGetGinTernaryValue(Datum X)
                                 70                 : {
                                 71          482948 :     return (GinTernaryValue) X;
                                 72                 : }
                                 73                 : 
                                 74                 : static inline Datum
                                 75          482948 : GinTernaryValueGetDatum(GinTernaryValue X)
                                 76                 : {
                                 77          482948 :     return (Datum) X;
                                 78                 : }
                                 79                 : 
                                 80                 : #define PG_RETURN_GIN_TERNARY_VALUE(x) return GinTernaryValueGetDatum(x)
                                 81                 : 
 3071 fujii                      82 ECB             : /* GUC parameters */
                                 83                 : extern PGDLLIMPORT int GinFuzzySearchLimit;
  366 rhaas                      84                 : extern PGDLLIMPORT int gin_pending_list_limit;
                                 85                 : 
                                 86                 : /* ginutil.c */
                                 87                 : extern void ginGetStats(Relation index, GinStatsData *stats);
 1467 heikki.linnakangas         88                 : extern void ginUpdateStats(Relation index, const GinStatsData *stats,
                                 89                 :                            bool is_build);
 4557 tgl                        90                 : 
                                 91                 : #endif                          /* GIN_H */
        

Generated by: LCOV version v1.16-55-g56c0a2a