diff options
author | Michael Meskes <meskes@postgresql.org> | 2007-08-14 10:01:54 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2007-08-14 10:01:54 +0000 |
commit | 635a0b9a8640bb7f2944a3f77ddc370f8dd7b010 (patch) | |
tree | d54146b2416fecd2a544f3bf786108079b879cfc /src/interfaces/ecpg/test/expected/sql-fetch.c | |
parent | b83bd31bd953b6daa22bcbdaee5ade2a27ec7324 (diff) | |
download | postgresql-635a0b9a8640bb7f2944a3f77ddc370f8dd7b010.tar.gz postgresql-635a0b9a8640bb7f2944a3f77ddc370f8dd7b010.zip |
- Finished major rewrite to use new protocol version
- Really prepare statements
- Added more regression tests
- Added auto-prepare mode
- Use '$n' for positional variables, '?' is still possible via ecpg option
- Cleaned up the sources a little bit
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-fetch.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/sql-fetch.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-fetch.c b/src/interfaces/ecpg/test/expected/sql-fetch.c index 9245e75ee34..0f69d3c848f 100644 --- a/src/interfaces/ecpg/test/expected/sql-fetch.c +++ b/src/interfaces/ecpg/test/expected/sql-fetch.c @@ -26,13 +26,13 @@ int main(int argc, char* argv[]) { /* exec sql begin declare section */ - + #line 9 "fetch.pgc" char str [ 25 ] ; #line 10 "fetch.pgc" - int i , how_many = 1 ; + int i ; /* exec sql end declare section */ #line 11 "fetch.pgc" @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { #line 17 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "create table My_Table ( Item1 int , Item2 text ) ", ECPGt_EOIT, ECPGt_EORT); #line 19 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -59,7 +59,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 19 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "insert into My_Table values ( 1 , 'text1' ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "insert into My_Table values ( 1 , 'text1' ) ", ECPGt_EOIT, ECPGt_EORT); #line 21 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -68,7 +68,7 @@ if (sqlca.sqlwarn[0] == 'W') sqlprint(); if (sqlca.sqlcode < 0) sqlprint();} #line 21 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "insert into My_Table values ( 2 , 'text2' ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "insert into My_Table values ( 2 , 'text2' ) ", ECPGt_EOIT, ECPGt_EORT); #line 22 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -77,7 +77,7 @@ if (sqlca.sqlwarn[0] == 'W') sqlprint(); if (sqlca.sqlcode < 0) sqlprint();} #line 22 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "insert into My_Table values ( 3 , 'text3' ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "insert into My_Table values ( 3 , 'text3' ) ", ECPGt_EOIT, ECPGt_EORT); #line 23 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -86,7 +86,7 @@ if (sqlca.sqlwarn[0] == 'W') sqlprint(); if (sqlca.sqlcode < 0) sqlprint();} #line 23 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "insert into My_Table values ( 4 , 'text4' ) ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "insert into My_Table values ( 4 , 'text4' ) ", ECPGt_EOIT, ECPGt_EORT); #line 24 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -100,7 +100,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 26 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "declare C cursor for select * from My_Table ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "declare C cursor for select * from My_Table ", ECPGt_EOIT, ECPGt_EORT); #line 28 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -114,7 +114,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 30 "fetch.pgc" while (1) { - { ECPGdo(__LINE__, 0, 1, NULL, "fetch 1 in C", ECPGt_EOIT, + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "fetch 1 in C", ECPGt_EOIT, ECPGt_int,&(i),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), @@ -136,7 +136,7 @@ if (sqlca.sqlcode < 0) sqlprint();} /* exec sql whenever not found continue ; */ #line 36 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "move backward 2 in C", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "move backward 2 in C", ECPGt_EOIT, ECPGt_EORT); #line 37 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -146,9 +146,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 37 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "fetch ? in C", - ECPGt_int,&(how_many),(long)1,(long)1,sizeof(int), - ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "fetch 1 in C", ECPGt_EOIT, ECPGt_int,&(i),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char), @@ -163,7 +161,7 @@ if (sqlca.sqlcode < 0) sqlprint();} printf("%d: %s\n", i, str); - { ECPGdo(__LINE__, 0, 1, NULL, "close C", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "close C", ECPGt_EOIT, ECPGt_EORT); #line 42 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); @@ -173,7 +171,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 42 "fetch.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "drop table My_Table ", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, 0, "drop table My_Table ", ECPGt_EOIT, ECPGt_EORT); #line 44 "fetch.pgc" if (sqlca.sqlwarn[0] == 'W') sqlprint(); |