LCOV - code coverage report
Current view: top level - src/include/access - gin_tuple.h (source / functions) Coverage Total Hit
Test: PostgreSQL 19devel Lines: 100.0 % 3 3
Test Date: 2026-02-28 14:14:49 Functions: 100.0 % 1 1
Legend: Lines:     hit not hit

            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
      35       100535 : GinTupleGetFirst(GinTuple *tup)
      36              : {
      37              :     GinPostingList *list;
      38              : 
      39       100535 :     list = (GinPostingList *) SHORTALIGN(tup->data + tup->keylen);
      40              : 
      41       100535 :     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.0-1