LCOV - differential code coverage report
Current view: top level - src/backend/utils/misc - pg_config.c (source / functions) Coverage Total Hit GIC
Current: c70b6db34ffeab48beef1fb4ce61bcad3772b8dd vs 06473f5a344df8c9594ead90a609b86f6724cff8 Lines: 100.0 % 12 12 12
Current Date: 2025-09-06 07:49:51 +0900 Functions: 100.0 % 1 1 1
Baseline: lcov-20250906-005545-baseline Branches: 100.0 % 2 2 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
(360..) days: 100.0 % 12 12 12
Function coverage date bins:
(360..) days: 100.0 % 1 1 1
Branch coverage date bins:
(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-2025, 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                 :                : 
                                 22                 :                : Datum
 3489 mail@joeconway.com         23                 :GIC           3 : pg_config(PG_FUNCTION_ARGS)
                                 24                 :                : {
 3376 rhaas@postgresql.org       25                 :              3 :     ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
                                 26                 :                :     ConfigData *configdata;
                                 27                 :                :     size_t      configdata_len;
                                 28                 :              3 :     int         i = 0;
                                 29                 :                : 
                                 30                 :                :     /* initialize our tuplestore */
 1054 michael@paquier.xyz        31                 :              3 :     InitMaterializedSRF(fcinfo, 0);
                                 32                 :                : 
 3489 mail@joeconway.com         33                 :              3 :     configdata = get_configdata(my_exec_path, &configdata_len);
                                 34         [ +  + ]:             72 :     for (i = 0; i < configdata_len; i++)
                                 35                 :                :     {
                                 36                 :                :         Datum       values[2];
                                 37                 :                :         bool        nulls[2];
                                 38                 :                : 
 1290 michael@paquier.xyz        39                 :             69 :         memset(values, 0, sizeof(values));
                                 40                 :             69 :         memset(nulls, 0, sizeof(nulls));
                                 41                 :                : 
                                 42                 :             69 :         values[0] = CStringGetTextDatum(configdata[i].name);
                                 43                 :             69 :         values[1] = CStringGetTextDatum(configdata[i].setting);
                                 44                 :                : 
 1279                            45                 :             69 :         tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
                                 46                 :                :     }
                                 47                 :                : 
 3489 mail@joeconway.com         48                 :              3 :     return (Datum) 0;
                                 49                 :                : }
        

Generated by: LCOV version 2.4-beta