LCOV - code coverage report
Current view: top level - contrib/btree_gist - btree_gist.c (source / functions) Hit Total Coverage
Test: PostgreSQL 18devel Lines: 6 11 54.5 %
Date: 2024-07-27 07:11:05 Functions: 5 7 71.4 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * contrib/btree_gist/btree_gist.c
       3             :  */
       4             : #include "postgres.h"
       5             : 
       6             : #include "utils/builtins.h"
       7             : 
       8          60 : PG_MODULE_MAGIC;
       9             : 
      10          44 : PG_FUNCTION_INFO_V1(gbt_decompress);
      11          12 : PG_FUNCTION_INFO_V1(gbtreekey_in);
      12          12 : PG_FUNCTION_INFO_V1(gbtreekey_out);
      13             : 
      14             : /**************************************************
      15             :  * In/Out for keys
      16             :  **************************************************/
      17             : 
      18             : 
      19             : Datum
      20           0 : gbtreekey_in(PG_FUNCTION_ARGS)
      21             : {
      22           0 :     Oid         typioparam = PG_GETARG_OID(1);
      23             : 
      24           0 :     ereport(ERROR,
      25             :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
      26             :              errmsg("cannot accept a value of type %s",
      27             :                     format_type_extended(typioparam, -1,
      28             :                                          FORMAT_TYPE_ALLOW_INVALID))));
      29             : 
      30             :     PG_RETURN_VOID();           /* keep compiler quiet */
      31             : }
      32             : 
      33             : Datum
      34           0 : gbtreekey_out(PG_FUNCTION_ARGS)
      35             : {
      36             :     /* Sadly, we do not receive any indication of the specific type */
      37           0 :     ereport(ERROR,
      38             :             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
      39             :              errmsg("cannot display a value of type %s", "gbtreekey?")));
      40             : 
      41             :     PG_RETURN_VOID();           /* keep compiler quiet */
      42             : }
      43             : 
      44             : 
      45             : /*
      46             : ** GiST DeCompress methods
      47             : ** do not do anything.
      48             : */
      49             : Datum
      50      222304 : gbt_decompress(PG_FUNCTION_ARGS)
      51             : {
      52      222304 :     PG_RETURN_POINTER(PG_GETARG_POINTER(0));
      53             : }

Generated by: LCOV version 1.14