LCOV - differential code coverage report
Current view: top level - src/backend/access/tablesample - tablesample.c (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage HEAD vs 15 Lines: 83.3 % 6 5 1 5
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: 83.3 % 6 5 1 5
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                 :  * tablesample.c
                                  4                 :  *        Support functions for TABLESAMPLE feature
                                  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/access/tablesample/tablesample.c
                                 12                 :  *
                                 13                 :  * -------------------------------------------------------------------------
                                 14                 :  */
                                 15                 : 
                                 16                 : #include "postgres.h"
                                 17                 : 
                                 18                 : #include "access/tsmapi.h"
                                 19                 : 
                                 20                 : 
                                 21                 : /*
                                 22                 :  * GetTsmRoutine --- get a TsmRoutine struct by invoking the handler.
                                 23                 :  *
                                 24                 :  * This is a convenience routine that's just meant to check for errors.
                                 25                 :  */
                                 26                 : TsmRoutine *
 2815 tgl                        27 CBC         512 : GetTsmRoutine(Oid tsmhandler)
                                 28                 : {
                                 29                 :     Datum       datum;
                                 30                 :     TsmRoutine *routine;
                                 31                 : 
                                 32             512 :     datum = OidFunctionCall1(tsmhandler, PointerGetDatum(NULL));
                                 33             512 :     routine = (TsmRoutine *) DatumGetPointer(datum);
                                 34                 : 
                                 35             512 :     if (routine == NULL || !IsA(routine, TsmRoutine))
 2815 tgl                        36 UBC           0 :         elog(ERROR, "tablesample handler function %u did not return a TsmRoutine struct",
                                 37                 :              tsmhandler);
                                 38                 : 
 2815 tgl                        39 CBC         512 :     return routine;
                                 40                 : }
        

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