LCOV - differential code coverage report
Current view: top level - contrib/pg_plan_advice - pgpa_identifier.h (source / functions) Coverage Total Hit GNC
Current: 0e5ff9b9b45a657aea12440478dc002e9b01f138 vs 0123ce131fca454009439dfa3b2266d1d40737d7 Lines: 100.0 % 6 6 6
Current Date: 2026-03-14 14:10:32 -0400 Functions: 100.0 % 1 1 1
Baseline: lcov-20260315-024220-baseline Branches: 100.0 % 6 6 6
Baseline Date: 2026-03-14 15:27:56 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(1,7] days: 100.0 % 6 6 6
Function coverage date bins:
(1,7] days: 100.0 % 1 1 1
Branch coverage date bins:
(1,7] days: 100.0 % 6 6 6

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * pgpa_identifier.h
                                  4                 :                :  *    create appropriate identifiers for range table entries
                                  5                 :                :  *
                                  6                 :                :  * Copyright (c) 2016-2026, PostgreSQL Global Development Group
                                  7                 :                :  *
                                  8                 :                :  *    contrib/pg_plan_advice/pgpa_identifier.h
                                  9                 :                :  *
                                 10                 :                :  *-------------------------------------------------------------------------
                                 11                 :                :  */
                                 12                 :                : 
                                 13                 :                : #ifndef PGPA_IDENTIFIER_H
                                 14                 :                : #define PGPA_IDENTIFIER_H
                                 15                 :                : 
                                 16                 :                : #include "nodes/pathnodes.h"
                                 17                 :                : #include "nodes/plannodes.h"
                                 18                 :                : 
                                 19                 :                : typedef struct pgpa_identifier
                                 20                 :                : {
                                 21                 :                :     const char *alias_name;
                                 22                 :                :     int         occurrence;
                                 23                 :                :     const char *partnsp;
                                 24                 :                :     const char *partrel;
                                 25                 :                :     const char *plan_name;
                                 26                 :                : } pgpa_identifier;
                                 27                 :                : 
                                 28                 :                : /* Convenience function for comparing possibly-NULL strings. */
                                 29                 :                : static inline bool
    3 rhaas@postgresql.org       30                 :GNC        2722 : strings_equal_or_both_null(const char *a, const char *b)
                                 31                 :                : {
                                 32         [ +  + ]:           2722 :     if (a == b)
                                 33                 :           2588 :         return true;
                                 34   [ +  +  +  + ]:            134 :     else if (a == NULL || b == NULL)
                                 35                 :             52 :         return false;
                                 36                 :                :     else
                                 37                 :             82 :         return strcmp(a, b) == 0;
                                 38                 :                : }
                                 39                 :                : 
                                 40                 :                : extern const char *pgpa_identifier_string(const pgpa_identifier *rid);
                                 41                 :                : extern void pgpa_compute_identifier_by_rti(PlannerInfo *root, Index rti,
                                 42                 :                :                                            pgpa_identifier *rid);
                                 43                 :                : extern int  pgpa_compute_identifiers_by_relids(PlannerInfo *root,
                                 44                 :                :                                                Bitmapset *relids,
                                 45                 :                :                                                pgpa_identifier *rids);
                                 46                 :                : extern pgpa_identifier *pgpa_create_identifiers_for_planned_stmt(PlannedStmt *pstmt);
                                 47                 :                : 
                                 48                 :                : extern Index pgpa_compute_rti_from_identifier(int rtable_length,
                                 49                 :                :                                               pgpa_identifier *rt_identifiers,
                                 50                 :                :                                               pgpa_identifier *rid);
                                 51                 :                : 
                                 52                 :                : #endif
        

Generated by: LCOV version 2.4-beta