LCOV - differential code coverage report
Current view: top level - src/backend/utils/misc - pg_config.c (source / functions) Coverage Total Hit GNC CBC DCB
Current: ba12a202ce1b5581dc0ed149cf3f637d7897ad5d vs 2866d8c7dbfc9d882a7d80fef93fbbe763709932 Lines: 100.0 % 11 11 1 10 2
Current Date: 2026-08-27 14:31:44 +0300 Functions: 100.0 % 1 1 1
Baseline: lcov-20260827-baseline Branches: 100.0 % 2 2 2
Baseline Date: 2026-08-27 14:31:58 +0300 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(30,360] days: 100.0 % 1 1 1
(360..) days: 100.0 % 10 10 10
Function coverage date bins:
(360..) days: 100.0 % 1 1 1
Branch coverage date bins:
(30,360] days: 100.0 % 2 2 2

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * pg_config.c
                                  4                 :                :  *      Expose same output as pg_config except as an SRF
                                  5                 :                :  *
                                  6                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                  7                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :                :  *
                                  9                 :                :  * IDENTIFICATION
                                 10                 :                :  *    src/backend/utils/misc/pg_config.c
                                 11                 :                :  *
                                 12                 :                :  *-------------------------------------------------------------------------
                                 13                 :                :  */
                                 14                 :                : 
                                 15                 :                : #include "postgres.h"
                                 16                 :                : 
                                 17                 :                : #include "common/config_info.h"
                                 18                 :                : #include "funcapi.h"
                                 19                 :                : #include "miscadmin.h"
                                 20                 :                : #include "utils/builtins.h"
                                 21                 :                : #include "utils/tuplestore.h"
                                 22                 :                : 
                                 23                 :                : Datum
 3844 mail@joeconway.com         24                 :CBC           4 : pg_config(PG_FUNCTION_ARGS)
                                 25                 :                : {
 3731 rhaas@postgresql.org       26                 :              4 :     ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
                                 27                 :                :     ConfigData *configdata;
                                 28                 :                :     size_t      configdata_len;
                                 29                 :                : 
                                 30                 :                :     /* initialize our tuplestore */
 1409 michael@paquier.xyz        31                 :              4 :     InitMaterializedSRF(fcinfo, 0);
                                 32                 :                : 
 3844 mail@joeconway.com         33                 :              4 :     configdata = get_configdata(my_exec_path, &configdata_len);
   47 peter@eisentraut.org       34         [ +  + ]:GNC          96 :     for (size_t i = 0; i < configdata_len; i++)
                                 35                 :                :     {
                                 36                 :                :         Datum       values[2];
                                 37                 :                :         bool        nulls[2];
                                 38                 :                : 
 1645 michael@paquier.xyz        39                 :CBC          92 :         memset(values, 0, sizeof(values));
                                 40                 :             92 :         memset(nulls, 0, sizeof(nulls));
                                 41                 :                : 
                                 42                 :             92 :         values[0] = CStringGetTextDatum(configdata[i].name);
                                 43                 :             92 :         values[1] = CStringGetTextDatum(configdata[i].setting);
                                 44                 :                : 
 1634                            45                 :             92 :         tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
                                 46                 :                :     }
                                 47                 :                : 
 3844 mail@joeconway.com         48                 :              4 :     return (Datum) 0;
                                 49                 :                : }
        

Generated by: LCOV version 2.0-1