LCOV - differential code coverage report
Current view: top level - src/include/optimizer - extendplan.h (source / functions) Coverage Total Hit UNC GNC
Current: 0e5ff9b9b45a657aea12440478dc002e9b01f138 vs 0123ce131fca454009439dfa3b2266d1d40737d7 Lines: 93.3 % 15 14 1 14
Current Date: 2026-03-14 14:10:32 -0400 Functions: 100.0 % 3 3 3
Baseline: lcov-20260315-024220-baseline Branches: 66.7 % 12 8 4 8
Baseline Date: 2026-03-14 15:27:56 +0100 Line coverage date bins:
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
(30,360] days: 93.3 % 15 14 1 14
Function coverage date bins:
(30,360] days: 100.0 % 3 3 3
Branch coverage date bins:
(30,360] days: 66.7 % 12 8 4 8

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*-------------------------------------------------------------------------
                                  2                 :                :  *
                                  3                 :                :  * extendplan.h
                                  4                 :                :  *    Extend core planner objects with additional private state
                                  5                 :                :  *
                                  6                 :                :  *
                                  7                 :                :  * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
                                  8                 :                :  * Portions Copyright (c) 1994, Regents of the University of California
                                  9                 :                :  *
                                 10                 :                :  * src/include/optimizer/extendplan.h
                                 11                 :                :  *
                                 12                 :                :  *-------------------------------------------------------------------------
                                 13                 :                :  */
                                 14                 :                : #ifndef EXTENDPLAN_H
                                 15                 :                : #define EXTENDPLAN_H
                                 16                 :                : 
                                 17                 :                : #include "nodes/pathnodes.h"
                                 18                 :                : 
                                 19                 :                : extern int  GetPlannerExtensionId(const char *extension_name);
                                 20                 :                : 
                                 21                 :                : /*
                                 22                 :                :  * Get extension-specific state from a PlannerGlobal.
                                 23                 :                :  */
                                 24                 :                : static inline void *
  159 rhaas@postgresql.org       25                 :GNC        1374 : GetPlannerGlobalExtensionState(PlannerGlobal *glob, int extension_id)
                                 26                 :                : {
                                 27         [ -  + ]:           1374 :     Assert(extension_id >= 0);
                                 28                 :                : 
                                 29         [ +  + ]:           1374 :     if (extension_id >= glob->extension_state_allocated)
                                 30                 :             41 :         return NULL;
                                 31                 :                : 
                                 32                 :           1333 :     return glob->extension_state[extension_id];
                                 33                 :                : }
                                 34                 :                : 
                                 35                 :                : /*
                                 36                 :                :  * Get extension-specific state from a PlannerInfo.
                                 37                 :                :  */
                                 38                 :                : static inline void *
                                 39                 :           7443 : GetPlannerInfoExtensionState(PlannerInfo *root, int extension_id)
                                 40                 :                : {
                                 41         [ -  + ]:           7443 :     Assert(extension_id >= 0);
                                 42                 :                : 
                                 43         [ -  + ]:           7443 :     if (extension_id >= root->extension_state_allocated)
  159 rhaas@postgresql.org       44                 :UNC           0 :         return NULL;
                                 45                 :                : 
  159 rhaas@postgresql.org       46                 :GNC        7443 :     return root->extension_state[extension_id];
                                 47                 :                : }
                                 48                 :                : 
                                 49                 :                : /*
                                 50                 :                :  * Get extension-specific state from a PlannerInfo.
                                 51                 :                :  */
                                 52                 :                : static inline void *
                                 53                 :            672 : GetRelOptInfoExtensionState(RelOptInfo *rel, int extension_id)
                                 54                 :                : {
                                 55         [ -  + ]:            672 :     Assert(extension_id >= 0);
                                 56                 :                : 
                                 57         [ +  + ]:            672 :     if (extension_id >= rel->extension_state_allocated)
                                 58                 :            176 :         return NULL;
                                 59                 :                : 
                                 60                 :            496 :     return rel->extension_state[extension_id];
                                 61                 :                : }
                                 62                 :                : 
                                 63                 :                : /* Functions to store private state into various planner objects */
                                 64                 :                : extern void SetPlannerGlobalExtensionState(PlannerGlobal *glob,
                                 65                 :                :                                            int extension_id,
                                 66                 :                :                                            void *opaque);
                                 67                 :                : extern void SetPlannerInfoExtensionState(PlannerInfo *root, int extension_id,
                                 68                 :                :                                          void *opaque);
                                 69                 :                : extern void SetRelOptInfoExtensionState(RelOptInfo *rel, int extension_id,
                                 70                 :                :                                         void *opaque);
                                 71                 :                : 
                                 72                 :                : #endif
        

Generated by: LCOV version 2.4-beta