LCOV - differential code coverage report
Current view: top level - src/include/access - gin_tuple.h (source / functions) Coverage Total Hit CBC
Current: 0e5ff9b9b45a657aea12440478dc002e9b01f138 vs 0123ce131fca454009439dfa3b2266d1d40737d7 Lines: 100.0 % 3 3 3
Current Date: 2026-03-14 14:10:32 -0400 Functions: 100.0 % 1 1 1
Baseline: lcov-20260315-024220-baseline Line coverage date bins:
Baseline Date: 2026-03-14 15:27:56 +0100 (360..) days: 100.0 % 3 3 3
Legend: Lines:     hit not hit Function coverage date bins:
(360..) days: 100.0 % 1 1 1

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*--------------------------------------------------------------------------
                                  2                 :  * gin_tuple.h
                                  3                 :  *    Public header file for Generalized Inverted Index access method.
                                  4                 :  *
                                  5                 :  *  Copyright (c) 2006-2026, PostgreSQL Global Development Group
                                  6                 :  *
                                  7                 :  *  src/include/access/gin_tuple.h
                                  8                 :  *--------------------------------------------------------------------------
                                  9                 :  */
                                 10                 : #ifndef GIN_TUPLE_H
                                 11                 : #define GIN_TUPLE_H
                                 12                 : 
                                 13                 : #include "access/ginblock.h"
                                 14                 : #include "storage/itemptr.h"
                                 15                 : #include "utils/sortsupport.h"
                                 16                 : 
                                 17                 : /*
                                 18                 :  * Data for one key in a GIN index.  (This is not the permanent in-index
                                 19                 :  * representation, but just a convenient format to use during the tuplesort
                                 20                 :  * stage of building a new GIN index.)
                                 21                 :  */
                                 22                 : typedef struct GinTuple
                                 23                 : {
                                 24                 :     int         tuplen;         /* length of the whole tuple */
                                 25                 :     OffsetNumber attrnum;       /* attnum of index key */
                                 26                 :     uint16      keylen;         /* bytes in data for key value */
                                 27                 :     int16       typlen;         /* typlen for key */
                                 28                 :     bool        typbyval;       /* typbyval for key */
                                 29                 :     signed char category;       /* category: normal or NULL? */
                                 30                 :     int         nitems;         /* number of TIDs in the data */
                                 31                 :     char        data[FLEXIBLE_ARRAY_MEMBER];
                                 32                 : } GinTuple;
                                 33                 : 
                                 34                 : static inline ItemPointer
  377 tomas.vondra@postgre       35 CBC       97742 : GinTupleGetFirst(GinTuple *tup)
                                 36                 : {
                                 37                 :     GinPostingList *list;
                                 38                 : 
                                 39           97742 :     list = (GinPostingList *) SHORTALIGN(tup->data + tup->keylen);
                                 40                 : 
                                 41           97742 :     return &list->first;
                                 42                 : }
                                 43                 : 
                                 44                 : extern int  _gin_compare_tuples(GinTuple *a, GinTuple *b, SortSupport ssup);
                                 45                 : 
                                 46                 : #endif                          /* GIN_TUPLE_H */
        

Generated by: LCOV version 2.4-beta