LCOV - differential code coverage report
Current view: top level - src/include/utils - partcache.h (source / functions) Coverage Total Hit CBC
Current: a2387c32f2f8a1643c7d71b951587e6bcb2d4744 vs 371a302eecdc82274b0ae2967d18fd726a0aa6a1 Lines: 100.0 % 14 14 14
Current Date: 2025-10-26 12:31:50 -0700 Functions: 100.0 % 7 7 7
Baseline: lcov-20251027-010456-baseline Line coverage date bins:
Baseline Date: 2025-10-26 11:01:32 +1300 (360..) days: 100.0 % 14 14 14
Legend: Lines:     hit not hit Function coverage date bins:
(360..) days: 100.0 % 7 7 7

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*-------------------------------------------------------------------------
                                  2                 :  *
                                  3                 :  * partcache.h
                                  4                 :  *
                                  5                 :  * Copyright (c) 1996-2025, PostgreSQL Global Development Group
                                  6                 :  *
                                  7                 :  * src/include/utils/partcache.h
                                  8                 :  *
                                  9                 :  *-------------------------------------------------------------------------
                                 10                 :  */
                                 11                 : #ifndef PARTCACHE_H
                                 12                 : #define PARTCACHE_H
                                 13                 : 
                                 14                 : #include "access/attnum.h"
                                 15                 : #include "fmgr.h"
                                 16                 : #include "nodes/parsenodes.h"
                                 17                 : #include "nodes/pg_list.h"
                                 18                 : #include "nodes/primnodes.h"
                                 19                 : #include "partitioning/partdefs.h"
                                 20                 : #include "utils/relcache.h"
                                 21                 : 
                                 22                 : /*
                                 23                 :  * Information about the partition key of a relation
                                 24                 :  */
                                 25                 : typedef struct PartitionKeyData
                                 26                 : {
                                 27                 :     PartitionStrategy strategy; /* partitioning strategy */
                                 28                 :     int16       partnatts;      /* number of columns in the partition key */
                                 29                 :     AttrNumber *partattrs;      /* attribute numbers of columns in the
                                 30                 :                                  * partition key or 0 if it's an expr */
                                 31                 :     List       *partexprs;      /* list of expressions in the partitioning
                                 32                 :                                  * key, one for each zero-valued partattrs */
                                 33                 : 
                                 34                 :     Oid        *partopfamily;   /* OIDs of operator families */
                                 35                 :     Oid        *partopcintype;  /* OIDs of opclass declared input data types */
                                 36                 :     FmgrInfo   *partsupfunc;    /* lookup info for support funcs */
                                 37                 : 
                                 38                 :     /* Partitioning collation per attribute */
                                 39                 :     Oid        *partcollation;
                                 40                 : 
                                 41                 :     /* Type information per attribute */
                                 42                 :     Oid        *parttypid;
                                 43                 :     int32      *parttypmod;
                                 44                 :     int16      *parttyplen;
                                 45                 :     bool       *parttypbyval;
                                 46                 :     char       *parttypalign;
                                 47                 :     Oid        *parttypcoll;
                                 48                 : }           PartitionKeyData;
                                 49                 : 
                                 50                 : 
                                 51                 : extern PartitionKey RelationGetPartitionKey(Relation rel);
                                 52                 : extern List *RelationGetPartitionQual(Relation rel);
                                 53                 : extern Expr *get_partition_qual_relid(Oid relid);
                                 54                 : 
                                 55                 : /*
                                 56                 :  * PartitionKey inquiry functions
                                 57                 :  */
                                 58                 : static inline int
 2753 alvherre@alvh.no-ip.       59 CBC        5254 : get_partition_strategy(PartitionKey key)
                                 60                 : {
                                 61            5254 :     return key->strategy;
                                 62                 : }
                                 63                 : 
                                 64                 : static inline int
                                 65            5588 : get_partition_natts(PartitionKey key)
                                 66                 : {
                                 67            5588 :     return key->partnatts;
                                 68                 : }
                                 69                 : 
                                 70                 : static inline List *
                                 71            9704 : get_partition_exprs(PartitionKey key)
                                 72                 : {
                                 73            9704 :     return key->partexprs;
                                 74                 : }
                                 75                 : 
                                 76                 : /*
                                 77                 :  * PartitionKey inquiry functions - one column
                                 78                 :  */
                                 79                 : static inline int16
                                 80             291 : get_partition_col_attnum(PartitionKey key, int col)
                                 81                 : {
                                 82             291 :     return key->partattrs[col];
                                 83                 : }
                                 84                 : 
                                 85                 : static inline Oid
                                 86            7385 : get_partition_col_typid(PartitionKey key, int col)
                                 87                 : {
                                 88            7385 :     return key->parttypid[col];
                                 89                 : }
                                 90                 : 
                                 91                 : static inline int32
                                 92            7302 : get_partition_col_typmod(PartitionKey key, int col)
                                 93                 : {
                                 94            7302 :     return key->parttypmod[col];
                                 95                 : }
                                 96                 : 
                                 97                 : static inline Oid
 2467 peter@eisentraut.org       98            7302 : get_partition_col_collation(PartitionKey key, int col)
                                 99                 : {
                                100            7302 :     return key->partcollation[col];
                                101                 : }
                                102                 : 
                                103                 : #endif                          /* PARTCACHE_H */
        

Generated by: LCOV version 2.4-beta