LCOV - differential code coverage report
Current view: top level - src/backend/access/table - tableam_indexscan.c (source / functions) Coverage Total Hit UNC GNC
Current: 1a1248818fb8b8b0353c292c632d6a6af77e8209 vs 8e82d6610e7280d7870c0c36ff1c797e3cfb3e09 Lines: 88.9 % 9 8 1 8
Current Date: 2026-10-12 11:56:10 +0200 Functions: 100.0 % 1 1 1
Baseline: lcov-20261012-baseline Branches: 75.0 % 4 3 1 3
Baseline Date: 2026-10-12 10:36:06 +0200 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(7,30] days: 88.9 % 9 8 1 8
Function coverage date bins:
(7,30] days: 100.0 % 1 1 1
Branch coverage date bins:
(7,30] days: 75.0 % 4 3 1 3

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * tableam_indexscan.c
                                  4                 :                :  *    Helpers for table AM index scan callbacks.
                                  5                 :                :  *
                                  6                 :                :  *
                                  7                 :                :  * Table AMs can use these functions to implement xs_getnext_slot callbacks.
                                  8                 :                :  * See access/tableam.h.
                                  9                 :                :  *
                                 10                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                 11                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                 12                 :                :  *
                                 13                 :                :  *
                                 14                 :                :  * IDENTIFICATION
                                 15                 :                :  *    src/backend/access/table/tableam_indexscan.c
                                 16                 :                :  *
                                 17                 :                :  *-------------------------------------------------------------------------
                                 18                 :                :  */
                                 19                 :                : 
                                 20                 :                : #include "postgres.h"
                                 21                 :                : 
                                 22                 :                : #include "access/tableam_indexscan.h"
                                 23                 :                : #include "utils/builtins.h"
                                 24                 :                : 
                                 25                 :                : /*
                                 26                 :                :  * Copy all name columns stored as cstrings back into NAMEDATALEN bytes of
                                 27                 :                :  * xs_name_cstring_buf.
                                 28                 :                :  *
                                 29                 :                :  * Called by tableam_index_fill_ios_slot (kept out of line, since it's needed
                                 30                 :                :  * only by index-only scans of indexes on "name" columns).
                                 31                 :                :  */
                                 32                 :                : pg_attribute_cold void
   27 pg@bowt.ie                 33                 :GNC        5524 : tableam_index_fill_ios_names(IndexScanDesc scan, TupleTableSlot *slot)
                                 34                 :                : {
                                 35         [ +  + ]:          11048 :     for (int idx = 0; idx < scan->xs_name_cstring_count; idx++)
                                 36                 :                :     {
                                 37                 :           5524 :         int         attnum = scan->xs_name_cstring_attnums[idx];
                                 38                 :                :         Name        name;
                                 39                 :                : 
                                 40                 :                :         /* skip null Datums */
                                 41         [ -  + ]:           5524 :         if (slot->tts_isnull[attnum])
   27 pg@bowt.ie                 42                 :UNC           0 :             continue;
                                 43                 :                : 
                                 44                 :                :         /* use namestrcpy to zero-pad all trailing bytes */
   27 pg@bowt.ie                 45                 :GNC        5524 :         name = (Name) (scan->xs_name_cstring_buf + idx * NAMEDATALEN);
                                 46                 :           5524 :         namestrcpy(name, DatumGetCString(slot->tts_values[attnum]));
                                 47                 :           5524 :         slot->tts_values[attnum] = NameGetDatum(name);
                                 48                 :                :     }
                                 49                 :           5524 : }
        

Generated by: LCOV version 2.0-1