LCOV - differential code coverage report
Current view: top level - contrib/btree_gist - btree_gist.c (source / functions) Coverage Total Hit UBC CBC
Current: c70b6db34ffeab48beef1fb4ce61bcad3772b8dd vs 06473f5a344df8c9594ead90a609b86f6724cff8 Lines: 51.9 % 27 14 13 14
Current Date: 2025-09-06 07:49:51 +0900 Functions: 77.8 % 9 7 2 7
Baseline: lcov-20250906-005545-baseline Branches: 20.0 % 10 2 8 2
Baseline Date: 2025-09-05 08:21:35 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(30,360] days: 52.9 % 17 9 8 9
(360..) days: 50.0 % 10 5 5 5
Function coverage date bins:
(30,360] days: 100.0 % 3 3 3
(360..) days: 66.7 % 6 4 2 4
Branch coverage date bins:
(30,360] days: 33.3 % 6 2 4 2
(360..) 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/cmptype.h"
                                  7                 :                : #include "access/stratnum.h"
                                  8                 :                : #include "utils/builtins.h"
                                  9                 :                : 
  164 tgl@sss.pgh.pa.us          10                 :CBC          33 : PG_MODULE_MAGIC_EXT(
                                 11                 :                :                     .name = "btree_gist",
                                 12                 :                :                     .version = PG_VERSION
                                 13                 :                : );
                                 14                 :                : 
 7771 teodor@sigaev.ru           15                 :             27 : PG_FUNCTION_INFO_V1(gbt_decompress);
 7678 bruce@momjian.us           16                 :             18 : PG_FUNCTION_INFO_V1(gbtreekey_in);
 7771 teodor@sigaev.ru           17                 :             18 : PG_FUNCTION_INFO_V1(gbtreekey_out);
   96 peter@eisentraut.org       18                 :              5 : PG_FUNCTION_INFO_V1(gist_translate_cmptype_btree);
                                 19                 :                : 
                                 20                 :                : /**************************************************
                                 21                 :                :  * In/Out for keys
                                 22                 :                :  **************************************************/
                                 23                 :                : 
                                 24                 :                : 
                                 25                 :                : Datum
 7771 teodor@sigaev.ru           26                 :UBC           0 : gbtreekey_in(PG_FUNCTION_ARGS)
                                 27                 :                : {
 1001 tgl@sss.pgh.pa.us          28                 :              0 :     Oid         typioparam = PG_GETARG_OID(1);
                                 29                 :                : 
 7678 bruce@momjian.us           30         [ #  # ]:              0 :     ereport(ERROR,
                                 31                 :                :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                 32                 :                :              errmsg("cannot accept a value of type %s",
                                 33                 :                :                     format_type_extended(typioparam, -1,
                                 34                 :                :                                          FORMAT_TYPE_ALLOW_INVALID))));
                                 35                 :                : 
                                 36                 :                :     PG_RETURN_VOID();           /* keep compiler quiet */
                                 37                 :                : }
                                 38                 :                : 
                                 39                 :                : Datum
 7771 teodor@sigaev.ru           40                 :              0 : gbtreekey_out(PG_FUNCTION_ARGS)
                                 41                 :                : {
                                 42                 :                :     /* Sadly, we do not receive any indication of the specific type */
 7678 bruce@momjian.us           43         [ #  # ]:              0 :     ereport(ERROR,
                                 44                 :                :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                 45                 :                :              errmsg("cannot display a value of type %s", "gbtreekey?")));
                                 46                 :                : 
                                 47                 :                :     PG_RETURN_VOID();           /* keep compiler quiet */
                                 48                 :                : }
                                 49                 :                : 
                                 50                 :                : 
                                 51                 :                : /*
                                 52                 :                : ** GiST DeCompress methods
                                 53                 :                : ** do not do anything.
                                 54                 :                : */
                                 55                 :                : Datum
 7771 teodor@sigaev.ru           56                 :CBC      101517 : gbt_decompress(PG_FUNCTION_ARGS)
                                 57                 :                : {
 7678 bruce@momjian.us           58                 :         101517 :     PG_RETURN_POINTER(PG_GETARG_POINTER(0));
                                 59                 :                : }
                                 60                 :                : 
                                 61                 :                : /*
                                 62                 :                :  * Returns the btree number for supported operators, otherwise invalid.
                                 63                 :                :  */
                                 64                 :                : Datum
   96 peter@eisentraut.org       65                 :              5 : gist_translate_cmptype_btree(PG_FUNCTION_ARGS)
                                 66                 :                : {
  234                            67                 :              5 :     CompareType cmptype = PG_GETARG_INT32(0);
                                 68                 :                : 
                                 69   [ +  -  -  -  :              5 :     switch (cmptype)
                                              -  + ]
                                 70                 :                :     {
                                 71                 :              4 :         case COMPARE_EQ:
  354                            72                 :              4 :             PG_RETURN_UINT16(BTEqualStrategyNumber);
  234 peter@eisentraut.org       73                 :UBC           0 :         case COMPARE_LT:
  354                            74                 :              0 :             PG_RETURN_UINT16(BTLessStrategyNumber);
  234                            75                 :              0 :         case COMPARE_LE:
  354                            76                 :              0 :             PG_RETURN_UINT16(BTLessEqualStrategyNumber);
  234                            77                 :              0 :         case COMPARE_GT:
  354                            78                 :              0 :             PG_RETURN_UINT16(BTGreaterStrategyNumber);
  234                            79                 :              0 :         case COMPARE_GE:
  354                            80                 :              0 :             PG_RETURN_UINT16(BTGreaterEqualStrategyNumber);
  354 peter@eisentraut.org       81                 :CBC           1 :         default:
                                 82                 :              1 :             PG_RETURN_UINT16(InvalidStrategy);
                                 83                 :                :     }
                                 84                 :                : }
        

Generated by: LCOV version 2.4-beta