diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-10-04 00:30:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-10-04 00:30:14 +0000 |
commit | f99a569a2ee3763b4ae174e81250c95ca0fdcbb6 (patch) | |
tree | 76e6371fe8b347c73d7020c0bc54b9fba519dc10 /src/interfaces/ecpg/test/expected/sql-indicators.c | |
parent | 451e419e9852cdf9d7e7cefc09d5355abb3405e9 (diff) | |
download | postgresql-f99a569a2ee3763b4ae174e81250c95ca0fdcbb6.tar.gz postgresql-f99a569a2ee3763b4ae174e81250c95ca0fdcbb6.zip |
pgindent run for 8.2.
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-indicators.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/sql-indicators.c | 114 |
1 files changed, 74 insertions, 40 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-indicators.c b/src/interfaces/ecpg/test/expected/sql-indicators.c index cc7054d4731..1a910ae03d7 100644 --- a/src/interfaces/ecpg/test/expected/sql-indicators.c +++ b/src/interfaces/ecpg/test/expected/sql-indicators.c @@ -75,7 +75,6 @@ struct sqlca_t *ECPGget_sqlca(void); #ifdef __cplusplus } #endif - #endif #line 3 "indicators.pgc" @@ -92,98 +91,133 @@ struct sqlca_t *ECPGget_sqlca(void); -int main(int argc, char **argv) +int +main(int argc, char **argv) { /* exec sql begin declare section */ - - - + + + #line 10 "indicators.pgc" - int intvar = 5 ; - + int intvar = 5; + #line 11 "indicators.pgc" - int nullind = - 1 ; + int nullind = -1; + /* exec sql end declare section */ #line 12 "indicators.pgc" - ECPGdebug(1,stderr); + ECPGdebug(1, stderr); - { ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); } + { + ECPGconnect(__LINE__, 0, "regress1", NULL, NULL, NULL, 0); + } #line 16 "indicators.pgc" - { ECPGsetcommit(__LINE__, "off", NULL);} + { + ECPGsetcommit(__LINE__, "off", NULL); + } #line 17 "indicators.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "create table test ( \"id\" int primary key , \"str\" text not null , val int null ) ", ECPGt_EOIT, ECPGt_EORT); + } #line 22 "indicators.pgc" - { ECPGtrans(__LINE__, NULL, "commit");} + { + ECPGtrans(__LINE__, NULL, "commit"); + } #line 23 "indicators.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 1 , 'Hello' , 0 ) ", ECPGt_EOIT, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 1 , 'Hello' , 0 ) ", ECPGt_EOIT, ECPGt_EORT); + } #line 25 "indicators.pgc" /* use indicator in insert */ - { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 2 , 'Hi there' , ? ) ", - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 2 , 'Hi there' , ? ) ", + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT); + } #line 28 "indicators.pgc" nullind = 0; - { ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 3 , 'Good evening' , ? ) ", - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "insert into test ( id , str , val ) values( 3 , 'Good evening' , ? ) ", + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT); + } #line 30 "indicators.pgc" - { ECPGtrans(__LINE__, NULL, "commit");} + { + ECPGtrans(__LINE__, NULL, "commit"); + } #line 31 "indicators.pgc" /* use indicators to get information about selects */ - { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT, - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT, + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT); + } #line 34 "indicators.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 2 ", ECPGt_EOIT, - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 2 ", ECPGt_EOIT, + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT); + } #line 35 "indicators.pgc" printf("intvar: %d, nullind: %d\n", intvar, nullind); - { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 3 ", ECPGt_EOIT, - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 3 ", ECPGt_EOIT, + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT); + } #line 37 "indicators.pgc" printf("intvar: %d, nullind: %d\n", intvar, nullind); /* use indicators for update */ - intvar = 5; nullind = -1; - { ECPGdo(__LINE__, 0, 1, NULL, "update test set val = ? where id = 1 ", - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EOIT, ECPGt_EORT);} + intvar = 5; + nullind = -1; + { + ECPGdo(__LINE__, 0, 1, NULL, "update test set val = ? where id = 1 ", + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EOIT, ECPGt_EORT); + } #line 42 "indicators.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT, - ECPGt_int,&(intvar),(long)1,(long)1,sizeof(int), - ECPGt_int,&(nullind),(long)1,(long)1,sizeof(int), ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "select val from test where id = 1 ", ECPGt_EOIT, + ECPGt_int, &(intvar), (long) 1, (long) 1, sizeof(int), + ECPGt_int, &(nullind), (long) 1, (long) 1, sizeof(int), ECPGt_EORT); + } #line 43 "indicators.pgc" printf("intvar: %d, nullind: %d\n", intvar, nullind); - { ECPGdo(__LINE__, 0, 1, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT);} + { + ECPGdo(__LINE__, 0, 1, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT); + } #line 46 "indicators.pgc" - { ECPGtrans(__LINE__, NULL, "commit");} + { + ECPGtrans(__LINE__, NULL, "commit"); + } #line 47 "indicators.pgc" - { ECPGdisconnect(__LINE__, "CURRENT");} + { + ECPGdisconnect(__LINE__, "CURRENT"); + } #line 49 "indicators.pgc" return 0; |