LCOV - differential code coverage report
Current view: top level - src/backend/catalog - pg_class.c (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage HEAD vs 15 Lines: 91.7 % 24 22 2 22
Current Date: 2023-04-08 17:13:01 Functions: 100.0 % 1 1 1
Baseline: 15 Line coverage date bins:
Baseline Date: 2023-04-08 15:09:40 (240..) days: 91.7 % 24 22 2 22
Legend: Lines: hit not hit Function coverage date bins:
(240..) days: 100.0 % 1 1 1

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*-------------------------------------------------------------------------
                                  2                 :  *
                                  3                 :  * pg_class.c
                                  4                 :  *    routines to support manipulation of the pg_class relation
                                  5                 :  *
                                  6                 :  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
                                  7                 :  * Portions Copyright (c) 1994, Regents of the University of California
                                  8                 :  *
                                  9                 :  *
                                 10                 :  * IDENTIFICATION
                                 11                 :  *    src/backend/catalog/pg_class.c
                                 12                 :  *
                                 13                 :  *-------------------------------------------------------------------------
                                 14                 :  */
                                 15                 : #include "postgres.h"
                                 16                 : 
                                 17                 : #include "catalog/pg_class.h"
                                 18                 : 
                                 19                 : /*
                                 20                 :  * Issue an errdetail() informing that the relkind is not supported for this
                                 21                 :  * operation.
                                 22                 :  */
                                 23                 : int
  640 peter                      24 CBC         114 : errdetail_relkind_not_supported(char relkind)
                                 25                 : {
                                 26             114 :     switch (relkind)
                                 27                 :     {
                                 28               6 :         case RELKIND_RELATION:
                                 29               6 :             return errdetail("This operation is not supported for tables.");
                                 30              18 :         case RELKIND_INDEX:
                                 31              18 :             return errdetail("This operation is not supported for indexes.");
                                 32              11 :         case RELKIND_SEQUENCE:
                                 33              11 :             return errdetail("This operation is not supported for sequences.");
                                 34               3 :         case RELKIND_TOASTVALUE:
                                 35               3 :             return errdetail("This operation is not supported for TOAST tables.");
                                 36              32 :         case RELKIND_VIEW:
                                 37              32 :             return errdetail("This operation is not supported for views.");
                                 38               3 :         case RELKIND_MATVIEW:
                                 39               3 :             return errdetail("This operation is not supported for materialized views.");
                                 40               3 :         case RELKIND_COMPOSITE_TYPE:
                                 41               3 :             return errdetail("This operation is not supported for composite types.");
                                 42              17 :         case RELKIND_FOREIGN_TABLE:
                                 43              17 :             return errdetail("This operation is not supported for foreign tables.");
                                 44              13 :         case RELKIND_PARTITIONED_TABLE:
                                 45              13 :             return errdetail("This operation is not supported for partitioned tables.");
                                 46               8 :         case RELKIND_PARTITIONED_INDEX:
                                 47               8 :             return errdetail("This operation is not supported for partitioned indexes.");
  640 peter                      48 UBC           0 :         default:
                                 49               0 :             elog(ERROR, "unrecognized relkind: '%c'", relkind);
                                 50                 :             return 0;
                                 51                 :     }
                                 52                 : }
        

Generated by: LCOV version v1.16-55-g56c0a2a