LCOV - differential code coverage report
Current view: top level - contrib/btree_gist - btree_gist.c (source / functions) Coverage Total Hit UNC UBC GNC CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 51.9 % 27 14 8 5 8 6
Current Date: 2024-04-14 14:21:10 Functions: 77.8 % 9 7 2 2 5
Baseline: 16@8cea358b128 Branches: 20.0 % 10 2 4 4 2
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (60,120] days: 50.0 % 16 8 8 8
(240..) days: 54.5 % 11 6 5 6
Function coverage date bins:
(60,120] days: 100.0 % 2 2 2
(240..) days: 71.4 % 7 5 2 5
Branch coverage date bins:
(60,120] days: 33.3 % 6 2 4 2
(240..) days: 0.0 % 4 0 4

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * contrib/btree_gist/btree_gist.c
                                  3                 :                :  */
                                  4                 :                : #include "postgres.h"
                                  5                 :                : 
                                  6                 :                : #include "access/stratnum.h"
                                  7                 :                : #include "utils/builtins.h"
                                  8                 :                : 
 6529 tgl@sss.pgh.pa.us           9                 :CBC          32 : PG_MODULE_MAGIC;
                                 10                 :                : 
 7261 teodor@sigaev.ru           11                 :             23 : PG_FUNCTION_INFO_V1(gbt_decompress);
 7168 bruce@momjian.us           12                 :              6 : PG_FUNCTION_INFO_V1(gbtreekey_in);
 7261 teodor@sigaev.ru           13                 :              6 : PG_FUNCTION_INFO_V1(gbtreekey_out);
   86 peter@eisentraut.org       14                 :GNC           3 : PG_FUNCTION_INFO_V1(gist_stratnum_btree);
                                 15                 :                : 
                                 16                 :                : /**************************************************
                                 17                 :                :  * In/Out for keys
                                 18                 :                :  **************************************************/
                                 19                 :                : 
                                 20                 :                : 
                                 21                 :                : Datum
 7261 teodor@sigaev.ru           22                 :UBC           0 : gbtreekey_in(PG_FUNCTION_ARGS)
                                 23                 :                : {
  491 tgl@sss.pgh.pa.us          24                 :              0 :     Oid         typioparam = PG_GETARG_OID(1);
                                 25                 :                : 
 7168 bruce@momjian.us           26         [ #  # ]:              0 :     ereport(ERROR,
                                 27                 :                :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                 28                 :                :              errmsg("cannot accept a value of type %s",
                                 29                 :                :                     format_type_extended(typioparam, -1,
                                 30                 :                :                                          FORMAT_TYPE_ALLOW_INVALID))));
                                 31                 :                : 
                                 32                 :                :     PG_RETURN_VOID();           /* keep compiler quiet */
                                 33                 :                : }
                                 34                 :                : 
                                 35                 :                : Datum
 7261 teodor@sigaev.ru           36                 :              0 : gbtreekey_out(PG_FUNCTION_ARGS)
                                 37                 :                : {
                                 38                 :                :     /* Sadly, we do not receive any indication of the specific type */
 7168 bruce@momjian.us           39         [ #  # ]:              0 :     ereport(ERROR,
                                 40                 :                :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                 41                 :                :              errmsg("cannot display a value of type %s", "gbtreekey?")));
                                 42                 :                : 
                                 43                 :                :     PG_RETURN_VOID();           /* keep compiler quiet */
                                 44                 :                : }
                                 45                 :                : 
                                 46                 :                : 
                                 47                 :                : /*
                                 48                 :                : ** GiST DeCompress methods
                                 49                 :                : ** do not do anything.
                                 50                 :                : */
                                 51                 :                : Datum
 7261 teodor@sigaev.ru           52                 :CBC      111282 : gbt_decompress(PG_FUNCTION_ARGS)
                                 53                 :                : {
 7168 bruce@momjian.us           54                 :         111282 :     PG_RETURN_POINTER(PG_GETARG_POINTER(0));
                                 55                 :                : }
                                 56                 :                : 
                                 57                 :                : /*
                                 58                 :                :  * Returns the btree number for supported operators, otherwise invalid.
                                 59                 :                :  */
                                 60                 :                : Datum
   86 peter@eisentraut.org       61                 :GNC           5 : gist_stratnum_btree(PG_FUNCTION_ARGS)
                                 62                 :                : {
                                 63                 :              5 :     StrategyNumber strat = PG_GETARG_UINT16(0);
                                 64                 :                : 
                                 65   [ +  -  -  -  :              5 :     switch (strat)
                                              -  + ]
                                 66                 :                :     {
                                 67                 :              4 :         case RTEqualStrategyNumber:
                                 68                 :              4 :             PG_RETURN_UINT16(BTEqualStrategyNumber);
   86 peter@eisentraut.org       69                 :UNC           0 :         case RTLessStrategyNumber:
                                 70                 :              0 :             PG_RETURN_UINT16(BTLessStrategyNumber);
                                 71                 :              0 :         case RTLessEqualStrategyNumber:
                                 72                 :              0 :             PG_RETURN_UINT16(BTLessEqualStrategyNumber);
                                 73                 :              0 :         case RTGreaterStrategyNumber:
                                 74                 :              0 :             PG_RETURN_UINT16(BTGreaterStrategyNumber);
                                 75                 :              0 :         case RTGreaterEqualStrategyNumber:
                                 76                 :              0 :             PG_RETURN_UINT16(BTGreaterEqualStrategyNumber);
   86 peter@eisentraut.org       77                 :GNC           1 :         default:
                                 78                 :              1 :             PG_RETURN_UINT16(InvalidStrategy);
                                 79                 :                :     }
                                 80                 :                : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622