1/* Processed by ecpg (regression mode) */
2/* These include files are added by the preprocessor */
6/* End of automatic include section */
7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
9#line 1 "sqljson_jsontable.pgc"
14#ifndef POSTGRES_SQLCA_H
15 #define POSTGRES_SQLCA_H
18#if defined(WIN32) || defined(__CYGWIN__)
19#define PGDLLIMPORT __declspec (dllimport)
22#endif /* __CYGWIN__ */
23#endif /* PGDLLIMPORT */
25 #define SQLERRMC_LEN 150
44 /* Element 0: empty */
45 /* 1: OID of processed tuple if applicable */
46 /* 2: number of rows processed */
47 /* after an INSERT, UPDATE or */
48 /* DELETE statement */
53 /* Element 0: set to 'W' if at least one other is 'W' */
54 /* 1: if 'W' at least one character string */
55 /* value was truncated when it was */
56 /* stored into a host variable. */
59 * 2: if 'W' a (hopefully) non-fatal notice occurred
71#ifndef POSTGRES_ECPG_INTERNAL
72 #define sqlca (*ECPGget_sqlca())
81#line 3 "sqljson_jsontable.pgc"
91#line 4 "sqljson_jsontable.pgc"
94/* exec sql whenever sqlerror sqlprint ; */
95#line 6 "sqljson_jsontable.pgc"
101/* exec sql begin declare section */
104#line 12 "sqljson_jsontable.pgc"
106/* exec sql end declare section */
107#line 13 "sqljson_jsontable.pgc"
112 {
ECPGconnect(__LINE__, 0,
"ecpg1_regression" , NULL, NULL , NULL, 0);
113#line 17 "sqljson_jsontable.pgc"
116#line 17 "sqljson_jsontable.pgc"
119#line 18 "sqljson_jsontable.pgc"
122#line 18 "sqljson_jsontable.pgc"
125 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"select foo from json_table ( jsonb '[{\"foo\":1}]' , '$[*]' as p0 columns ( foo int ) ) jt ( foo )",
ECPGt_EOIT,
126 ECPGt_int,&(foo),(
long)1,(
long)1,
sizeof(
int),
128#line 23 "sqljson_jsontable.pgc"
131#line 23 "sqljson_jsontable.pgc"
133 printf(
"Found foo=%d\n", foo);
135 {
ECPGdo(__LINE__, 0, 1, NULL, 0,
ECPGst_normal,
"select foo from json_table ( jsonb '[{\"foo\":\"1\"}]' , '$[*]' as p0 columns ( nested '$' as p1 columns ( nested path '$' as p11 columns ( foo int ) ) ) ) jt ( foo )",
ECPGt_EOIT,
136 ECPGt_int,&(foo),(
long)1,(
long)1,
sizeof(
int),
138#line 31 "sqljson_jsontable.pgc"
141#line 31 "sqljson_jsontable.pgc"
143 printf(
"Found foo=%d\n", foo);
146#line 34 "sqljson_jsontable.pgc"
149#line 34 "sqljson_jsontable.pgc"
bool ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
struct sqlca_t * ECPGget_sqlca(void)
char sqlerrmc[SQLERRMC_LEN]
struct sqlca_t::@172 sqlerrm