MCPcopy Create free account
hub / github.com/apache/cloudberry / main

Function main

src/interfaces/ecpg/test/expected/sql-createtableas.c:30–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30int
31main(void)
32{
33 /* exec sql begin declare section */
34
35
36#line 14 "createtableas.pgc"
37 int id ;
38/* exec sql end declare section */
39#line 15 "createtableas.pgc"
40
41
42 ECPGdebug(1, stderr);
43 { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
44#line 18 "createtableas.pgc"
45
46if (sqlca.sqlcode < 0) sqlprint();}
47#line 18 "createtableas.pgc"
48
49
50 { ECPGsetcommit(__LINE__, "on", NULL);
51#line 20 "createtableas.pgc"
52
53if (sqlca.sqlcode < 0) sqlprint();}
54#line 20 "createtableas.pgc"
55
56 /* exec sql whenever sql_warning sqlprint ; */
57#line 21 "createtableas.pgc"
58
59 /* exec sql whenever sqlerror sqlprint ; */
60#line 22 "createtableas.pgc"
61
62
63 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table cta_test ( id int )", ECPGt_EOIT, ECPGt_EORT);
64#line 24 "createtableas.pgc"
65
66if (sqlca.sqlwarn[0] == 'W') sqlprint();
67#line 24 "createtableas.pgc"
68
69if (sqlca.sqlcode < 0) sqlprint();}
70#line 24 "createtableas.pgc"
71
72 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into cta_test values ( 100 )", ECPGt_EOIT, ECPGt_EORT);
73#line 25 "createtableas.pgc"
74
75if (sqlca.sqlwarn[0] == 'W') sqlprint();
76#line 25 "createtableas.pgc"
77
78if (sqlca.sqlcode < 0) sqlprint();}
79#line 25 "createtableas.pgc"
80
81
82 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table if not exists cta_test1 as select * from cta_test", ECPGt_EOIT, ECPGt_EORT);
83#line 27 "createtableas.pgc"
84
85if (sqlca.sqlwarn[0] == 'W') sqlprint();
86#line 27 "createtableas.pgc"
87

Callers

nothing calls this directly

Calls 6

ECPGdebugFunction · 0.85
ECPGconnectFunction · 0.85
sqlprintFunction · 0.85
ECPGsetcommitFunction · 0.85
ECPGdoFunction · 0.85
ECPGdisconnectFunction · 0.85

Tested by

no test coverage detected