LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/sql - createtableas.pgc (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 21 21 21
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 1 1 1
Baseline: 16@8cea358b128 Branches: 50.0 % 44 22 22 22
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 100.0 % 21 21 21
Function coverage date bins:
(240..) days: 100.0 % 1 1 1
Branch coverage date bins:
(240..) days: 50.0 % 44 22 22 22

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : #include <stdlib.h>
                                  2                 :                : #include <string.h>
                                  3                 :                : #include <stdlib.h>
                                  4                 :                : #include <stdio.h>
                                  5                 :                : 
                                  6                 :                : exec sql include ../regression;
                                  7                 :                : 
                                  8                 :                : exec sql whenever sqlerror sqlprint;
                                  9                 :                : 
                                 10                 :                : int
 1882 meskes@postgresql.or       11                 :CBC           1 : main(void)
                                 12                 :                : {
                                 13                 :                :     EXEC SQL BEGIN DECLARE SECTION;
                                 14                 :                :         int id;
                                 15                 :                :     EXEC SQL END DECLARE SECTION;
                                 16                 :                : 
                                 17                 :              1 :     ECPGdebug(1, stderr);
                                 18                 :              1 :     EXEC SQL connect to REGRESSDB1;
                                 19         [ -  + ]:              1 : 
                                 20                 :              1 :     EXEC SQL SET AUTOCOMMIT TO ON;
                                 21         [ -  + ]:              1 :     EXEC SQL WHENEVER SQLWARNING SQLPRINT;
                                 22                 :                :     EXEC SQL WHENEVER SQLERROR SQLPRINT;
                                 23                 :                : 
                                 24                 :              1 :     EXEC SQL CREATE TABLE cta_test (id int);
                                 25   [ -  +  -  + ]:              1 :     EXEC SQL INSERT INTO cta_test values (100);
                                 26   [ -  +  -  + ]:              1 : 
                                 27                 :              1 :     EXEC SQL CREATE TABLE IF NOT EXISTS cta_test1 AS SELECT * FROM cta_test;
                                 28   [ -  +  -  + ]:              1 :     EXEC SQL SELECT id INTO :id FROM cta_test1;
                                 29   [ -  +  -  + ]:              1 :     printf("ID = %d\n", id);
                                 30                 :                : 
                                 31                 :              1 :     EXEC SQL CREATE TABLE cta_test2 AS SELECT * FROM cta_test WITH NO DATA;
                                 32   [ -  +  -  + ]:              1 :     EXEC SQL SELECT count(id) INTO :id FROM cta_test2;
                                 33   [ -  +  -  + ]:              1 :     printf("ID = %d\n", id);
                                 34                 :                : 
                                 35                 :              1 :     EXEC SQL DROP TABLE cta_test;
                                 36   [ -  +  -  + ]:              1 :     EXEC SQL DROP TABLE cta_test1;
                                 37   [ -  +  -  + ]:              1 :     EXEC SQL DROP TABLE cta_test2;
                                 38   [ -  +  -  + ]:              1 :     EXEC SQL DISCONNECT all;
                                 39   [ -  +  -  + ]:              1 : 
                                 40                 :              1 :     return 0;
                                 41                 :                : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622