PostgreSQL Source Code: src/interfaces/ecpg/test/expected/preproc-strings.c Source File

PostgreSQL Source Code git master
preproc-strings.c
Go to the documentation of this file.
1/* Processed by ecpg (regression mode) */
2/* These include files are added by the preprocessor */
3#include <ecpglib.h>
4#include <ecpgerrno.h>
5#include <sqlca.h>
6/* End of automatic include section */
7 #define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
8
9#line 1 "strings.pgc"
10
11#line 1 "regression.h"
12
13
14
15
16
17
18#line 3 "strings.pgc"
19/* exec sql begin declare section */
20#line 1 "strings.h"
21/* redundant declaration to silence -Wmissing-variable-declarations */
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40#line 5 "strings.pgc"
41
42#line 2 "strings.h"
43 extern char * s1 , * s2 , * s3 , * s4 , * s5 , * s6 , * s7 , * s8 ;
44
45#line 11 "strings.h"
46 char * s1 , * s2 , * s3 , * s4 , * s5 , * s6 , * s7 , * s8 ;
47/* exec sql end declare section */
48#line 5 "strings.pgc"
49
50
51 int main(void)
52{
53 ECPGdebug(1, stderr);
54
55 { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); }
56#line 11 "strings.pgc"
57
58
59 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to on", ECPGt_EOIT, ECPGt_EORT);}
60#line 13 "strings.pgc"
61
62
63 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 'abc''d\\ef' , N'abc''d\\ef' as foo , E'abc''d\\\\ef' as \"foo\"\"bar\" , U&'d\0061円t\0061円' as U&\"foo\"\"bar\" , U&'d!+000061t!+000061' UESCAPE '!' , $foo$abc$def$foo$", ECPGt_EOIT,
64 ECPGt_char,&(s1),(long)0,(long)1,(1)*sizeof(char),
65 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
66 ECPGt_char,&(s2),(long)0,(long)1,(1)*sizeof(char),
67 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
68 ECPGt_char,&(s3),(long)0,(long)1,(1)*sizeof(char),
69 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
70 ECPGt_char,&(s4),(long)0,(long)1,(1)*sizeof(char),
71 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
72 ECPGt_char,&(s5),(long)0,(long)1,(1)*sizeof(char),
73 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
74 ECPGt_char,&(s6),(long)0,(long)1,(1)*sizeof(char),
75 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
76#line 21 "strings.pgc"
77
78
79 printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6);
80
81 { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select b'0010' , x'019ABcd'", ECPGt_EOIT,
82 ECPGt_char,&(s7),(long)0,(long)1,(1)*sizeof(char),
83 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
84 ECPGt_char,&(s8),(long)0,(long)1,(1)*sizeof(char),
85 ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
86#line 26 "strings.pgc"
87
88
89 printf("%s %s\n", s7, s8);
90
91 { ECPGdisconnect(__LINE__, "CURRENT");}
92#line 30 "strings.pgc"
93
94 return 0;
95}
bool ECPGdisconnect(int lineno, const char *connection_name)
Definition: connect.c:693
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
Definition: connect.c:260
@ ECPGst_normal
Definition: ecpgtype.h:97
@ ECPGt_EOIT
Definition: ecpgtype.h:62
@ ECPGt_NO_INDICATOR
Definition: ecpgtype.h:64
@ ECPGt_EORT
Definition: ecpgtype.h:63
@ ECPGt_char
Definition: ecpgtype.h:43
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,...)
Definition: execute.c:2293
#define printf(...)
Definition: port.h:245
char * s8
char * s5
char * s1
int main(void)
char * s4
char * s2
char * s3
char * s7
#define ECPGdebug(X, Y)
Definition: preproc-strings.c:7
char * s6

AltStyle によって変換されたページ (->オリジナル) /