2007-01-11 15:47:34 +00:00
|
|
|
/* Processed by ecpg (regression mode) */
|
2006-08-02 14:14:04 +00:00
|
|
|
/* These include files are added by the preprocessor */
|
|
|
|
#include <ecpglib.h>
|
|
|
|
#include <ecpgerrno.h>
|
|
|
|
#include <sqlca.h>
|
|
|
|
/* End of automatic include section */
|
2007-01-12 10:00:14 +00:00
|
|
|
#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
|
2006-08-02 14:14:04 +00:00
|
|
|
|
|
|
|
#line 1 "show.pgc"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
2006-08-29 13:23:27 +00:00
|
|
|
#line 1 "regression.h"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#line 5 "show.pgc"
|
|
|
|
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
/* exec sql begin declare section */
|
2008-08-19 10:40:32 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 9 "show.pgc"
|
2008-12-29 17:07:06 +00:00
|
|
|
char var [ 25 ] = "public" ;
|
2006-08-02 14:14:04 +00:00
|
|
|
/* exec sql end declare section */
|
|
|
|
#line 10 "show.pgc"
|
|
|
|
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
ECPGdebug(1, stderr);
|
2007-03-17 19:25:24 +00:00
|
|
|
{ ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); }
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 13 "show.pgc"
|
|
|
|
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
/* exec sql whenever sql_warning sqlprint ; */
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 15 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
/* exec sql whenever sqlerror sqlprint ; */
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 16 "show.pgc"
|
|
|
|
|
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set search_path to $0",
|
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 18 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 18 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 18 "show.pgc"
|
|
|
|
|
2007-08-14 10:32:47 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show search_path", ECPGt_EOIT,
|
2006-10-04 10:09:03 +00:00
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
|
|
|
#line 19 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 19 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 19 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
printf("Var: Search path: %s\n", var);
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set search_path to 'public'", ECPGt_EOIT, ECPGt_EORT);
|
2006-10-04 10:09:03 +00:00
|
|
|
#line 22 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 22 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 22 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show search_path", ECPGt_EOIT,
|
2006-10-04 10:09:03 +00:00
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
|
|
|
#line 23 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 23 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 23 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
printf("Var: Search path: %s\n", var);
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to off", ECPGt_EOIT, ECPGt_EORT);
|
2006-10-04 10:09:03 +00:00
|
|
|
#line 26 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 26 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 26 "show.pgc"
|
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show standard_conforming_strings", ECPGt_EOIT,
|
2006-10-04 10:09:03 +00:00
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 27 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 27 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 27 "show.pgc"
|
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
printf("Var: Standard conforming strings: %s\n", var);
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set time zone PST8PDT", ECPGt_EOIT, ECPGt_EORT);
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 30 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 30 "show.pgc"
|
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
2006-08-02 14:14:04 +00:00
|
|
|
#line 30 "show.pgc"
|
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show time zone", ECPGt_EOIT,
|
2006-10-04 10:09:03 +00:00
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
|
|
|
#line 31 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 31 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 31 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
printf("Time Zone: %s\n", var);
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set transaction isolation level read committed", ECPGt_EOIT, ECPGt_EORT);
|
2006-10-04 10:09:03 +00:00
|
|
|
#line 34 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 34 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 34 "show.pgc"
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2008-08-19 10:40:32 +00:00
|
|
|
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "show transaction isolation level", ECPGt_EOIT,
|
|
|
|
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),
|
|
|
|
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
|
|
|
#line 35 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 35 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 35 "show.pgc"
|
|
|
|
|
|
|
|
printf("Transaction isolation level: %s\n", var);
|
|
|
|
|
|
|
|
{ ECPGdisconnect(__LINE__, "ALL");
|
|
|
|
#line 38 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlwarn[0] == 'W') sqlprint();
|
|
|
|
#line 38 "show.pgc"
|
|
|
|
|
|
|
|
if (sqlca.sqlcode < 0) sqlprint();}
|
|
|
|
#line 38 "show.pgc"
|
|
|
|
|
2006-08-02 14:14:04 +00:00
|
|
|
|
2006-10-04 10:09:03 +00:00
|
|
|
return 0;
|
2006-08-02 14:14:04 +00:00
|
|
|
}
|