mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Added STRING datatype for Informix compatibility mode. This work is
based on a patch send in by Böszörményi Zoltán <zb@cybertec.at>.
This commit is contained in:
@ -13,6 +13,7 @@ int main(void)
|
||||
{
|
||||
$int i = 14;
|
||||
$decimal j, m, n;
|
||||
$string c[10];
|
||||
|
||||
ECPGdebug(1, stderr);
|
||||
$whenever sqlerror do dosqlprint();
|
||||
@ -20,19 +21,19 @@ int main(void)
|
||||
$connect to REGRESSDB1;
|
||||
if (sqlca.sqlcode != 0) exit(1);
|
||||
|
||||
$create table test(i int primary key, j int);
|
||||
$create table test(i int primary key, j int, c text);
|
||||
|
||||
/* this INSERT works */
|
||||
rsetnull(CDECIMALTYPE, (char *)&j);
|
||||
$insert into test (i, j) values (7, :j);
|
||||
$insert into test (i, j, c) values (7, :j, 'test ');
|
||||
$commit;
|
||||
|
||||
/* this INSERT should fail because i is a unique column */
|
||||
$insert into test (i, j) values (7, NUMBER);
|
||||
$insert into test (i, j, c) values (7, NUMBER, 'a');
|
||||
printf("INSERT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
|
||||
if (sqlca.sqlcode != 0) $rollback;
|
||||
|
||||
$insert into test (i, j) values (:i, 1);
|
||||
$insert into test (i, j, c) values (:i, 1, 'a ');
|
||||
$commit;
|
||||
|
||||
/* this will fail (more than one row in subquery) */
|
||||
@ -51,7 +52,7 @@ int main(void)
|
||||
|
||||
while (1)
|
||||
{
|
||||
$fetch forward c into :i, :j;
|
||||
$fetch forward c into :i, :j, :c;
|
||||
if (sqlca.sqlcode == 100) break;
|
||||
else if (sqlca.sqlcode != 0) printf ("Error: %ld\n", sqlca.sqlcode);
|
||||
|
||||
@ -62,7 +63,7 @@ int main(void)
|
||||
int a;
|
||||
|
||||
dectoint(&j, &a);
|
||||
printf("%d %d\n", i, a);
|
||||
printf("%d %d \"%s\"\n", i, a, c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,106 +43,112 @@ int main(void)
|
||||
|
||||
#line 15 "test_informix.pgc"
|
||||
|
||||
|
||||
#line 16 "test_informix.pgc"
|
||||
char c [ 10 ] ;
|
||||
|
||||
#line 16 "test_informix.pgc"
|
||||
|
||||
|
||||
ECPGdebug(1, stderr);
|
||||
/* exec sql whenever sqlerror do dosqlprint ( ) ; */
|
||||
#line 18 "test_informix.pgc"
|
||||
#line 19 "test_informix.pgc"
|
||||
|
||||
|
||||
{ ECPGconnect(__LINE__, 1, "regress1" , NULL, NULL , NULL, 0);
|
||||
#line 20 "test_informix.pgc"
|
||||
#line 21 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 20 "test_informix.pgc"
|
||||
#line 21 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode != 0) exit(1);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table test ( i int primary key , j int )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 23 "test_informix.pgc"
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "create table test ( i int primary key , j int , c text )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 24 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 23 "test_informix.pgc"
|
||||
#line 24 "test_informix.pgc"
|
||||
|
||||
|
||||
/* this INSERT works */
|
||||
rsetnull(CDECIMALTYPE, (char *)&j);
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j ) values ( 7 , $1 )",
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( 7 , $1 , 'test ' )",
|
||||
ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 27 "test_informix.pgc"
|
||||
#line 28 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 27 "test_informix.pgc"
|
||||
#line 28 "test_informix.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 28 "test_informix.pgc"
|
||||
#line 29 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 28 "test_informix.pgc"
|
||||
#line 29 "test_informix.pgc"
|
||||
|
||||
|
||||
/* this INSERT should fail because i is a unique column */
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j ) values ( 7 , 12 )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 31 "test_informix.pgc"
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( 7 , 12 , 'a' )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 32 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 31 "test_informix.pgc"
|
||||
#line 32 "test_informix.pgc"
|
||||
|
||||
printf("INSERT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
|
||||
if (sqlca.sqlcode != 0) { ECPGtrans(__LINE__, NULL, "rollback");
|
||||
#line 33 "test_informix.pgc"
|
||||
#line 34 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 33 "test_informix.pgc"
|
||||
#line 34 "test_informix.pgc"
|
||||
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j ) values ( $1 , 1 )",
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "insert into test ( i , j , c ) values ( $1 , 1 , 'a ' )",
|
||||
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 35 "test_informix.pgc"
|
||||
#line 36 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 35 "test_informix.pgc"
|
||||
#line 36 "test_informix.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 36 "test_informix.pgc"
|
||||
#line 37 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 36 "test_informix.pgc"
|
||||
#line 37 "test_informix.pgc"
|
||||
|
||||
|
||||
/* this will fail (more than one row in subquery) */
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select i from test where j = ( select j from test )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 39 "test_informix.pgc"
|
||||
#line 40 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 39 "test_informix.pgc"
|
||||
#line 40 "test_informix.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "rollback");
|
||||
#line 40 "test_informix.pgc"
|
||||
#line 41 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 40 "test_informix.pgc"
|
||||
#line 41 "test_informix.pgc"
|
||||
|
||||
|
||||
/* this however should be ok */
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select i from test where j = ( select j from test order by i limit 1 )", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 43 "test_informix.pgc"
|
||||
#line 44 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 43 "test_informix.pgc"
|
||||
#line 44 "test_informix.pgc"
|
||||
|
||||
printf("SELECT: %ld=%s\n", sqlca.sqlcode, sqlca.sqlerrm.sqlerrmc);
|
||||
if (sqlca.sqlcode != 0) { ECPGtrans(__LINE__, NULL, "rollback");
|
||||
#line 45 "test_informix.pgc"
|
||||
#line 46 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 45 "test_informix.pgc"
|
||||
#line 46 "test_informix.pgc"
|
||||
|
||||
|
||||
ECPG_informix_set_var( 0, &( i ), __LINE__);\
|
||||
/* declare c cursor for select * from test where i <= $1 */
|
||||
#line 47 "test_informix.pgc"
|
||||
#line 48 "test_informix.pgc"
|
||||
|
||||
openit();
|
||||
|
||||
@ -154,11 +160,13 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_decimal,&(j),(long)1,(long)1,sizeof(decimal),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
|
||||
ECPGt_string,(c),(long)10,(long)1,(10)*sizeof(char),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
|
||||
#line 54 "test_informix.pgc"
|
||||
#line 55 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 54 "test_informix.pgc"
|
||||
#line 55 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode == 100) break;
|
||||
else if (sqlca.sqlcode != 0) printf ("Error: %ld\n", sqlca.sqlcode);
|
||||
@ -170,7 +178,7 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
int a;
|
||||
|
||||
dectoint(&j, &a);
|
||||
printf("%d %d\n", i, a);
|
||||
printf("%d %d \"%s\"\n", i, a, c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,53 +188,53 @@ if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "delete from test where i = $1 :: decimal",
|
||||
ECPGt_decimal,&(n),(long)1,(long)1,sizeof(decimal),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 72 "test_informix.pgc"
|
||||
#line 73 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 72 "test_informix.pgc"
|
||||
#line 73 "test_informix.pgc"
|
||||
|
||||
printf("DELETE: %ld\n", sqlca.sqlcode);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select 1 from test where i = 14", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 75 "test_informix.pgc"
|
||||
#line 76 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 75 "test_informix.pgc"
|
||||
#line 76 "test_informix.pgc"
|
||||
|
||||
printf("Exists: %ld\n", sqlca.sqlcode);
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "select 1 from test where i = 147", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 78 "test_informix.pgc"
|
||||
#line 79 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 78 "test_informix.pgc"
|
||||
#line 79 "test_informix.pgc"
|
||||
|
||||
printf("Does not exist: %ld\n", sqlca.sqlcode);
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 81 "test_informix.pgc"
|
||||
#line 82 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 81 "test_informix.pgc"
|
||||
#line 82 "test_informix.pgc"
|
||||
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 82 "test_informix.pgc"
|
||||
#line 83 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 82 "test_informix.pgc"
|
||||
#line 83 "test_informix.pgc"
|
||||
|
||||
{ ECPGtrans(__LINE__, NULL, "commit");
|
||||
#line 83 "test_informix.pgc"
|
||||
#line 84 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 83 "test_informix.pgc"
|
||||
#line 84 "test_informix.pgc"
|
||||
|
||||
|
||||
{ ECPGdisconnect(__LINE__, "CURRENT");
|
||||
#line 85 "test_informix.pgc"
|
||||
#line 86 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 85 "test_informix.pgc"
|
||||
#line 86 "test_informix.pgc"
|
||||
|
||||
|
||||
return 0;
|
||||
@ -237,10 +245,10 @@ static void openit(void)
|
||||
{ ECPGdo(__LINE__, 1, 1, NULL, 0, ECPGst_normal, "declare c cursor for select * from test where i <= $1 ",
|
||||
ECPGt_int,&(*( int *)(ECPG_informix_get_var( 0))),(long)1,(long)1,sizeof(int),
|
||||
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
|
||||
#line 92 "test_informix.pgc"
|
||||
#line 93 "test_informix.pgc"
|
||||
|
||||
if (sqlca.sqlcode < 0) dosqlprint ( );}
|
||||
#line 92 "test_informix.pgc"
|
||||
#line 93 "test_informix.pgc"
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,128 +2,132 @@
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: query: create table test ( i int primary key , j int ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 24: query: create table test ( i int primary key , j int , c text ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 24: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 23: OK: CREATE TABLE
|
||||
[NO_PID]: ecpg_execute on line 24: OK: CREATE TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 27: query: insert into test ( i , j ) values ( 7 , $1 ); with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 28: query: insert into test ( i , j , c ) values ( 7 , $1 , 'test ' ); with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 27: using PQexecParams
|
||||
[NO_PID]: ecpg_execute on line 28: using PQexecParams
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: free_params on line 27: parameter 1 = 0
|
||||
[NO_PID]: free_params on line 28: parameter 1 = 0
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 27: OK: INSERT 0 1
|
||||
[NO_PID]: ecpg_execute on line 28: OK: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans on line 28: action "commit"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 29: action "commit"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 31: query: insert into test ( i , j ) values ( 7 , 12 ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 32: query: insert into test ( i , j , c ) values ( 7 , 12 , 'a' ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 31: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 32: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_check_PQresult on line 31: ERROR: duplicate key value violates unique constraint "test_pkey"
|
||||
[NO_PID]: ecpg_check_PQresult on line 32: ERROR: duplicate key value violates unique constraint "test_pkey"
|
||||
DETAIL: Key (i)=(7) already exists.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlstate 23505 (sqlcode -239) on line 31: duplicate key value violates unique constraint "test_pkey" on line 31
|
||||
[NO_PID]: raising sqlstate 23505 (sqlcode -239) on line 32: duplicate key value violates unique constraint "test_pkey" on line 32
|
||||
[NO_PID]: sqlca: code: -239, state: 23505
|
||||
[NO_PID]: ECPGtrans on line 33: action "rollback"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 34: action "rollback"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 35: query: insert into test ( i , j ) values ( $1 , 1 ); with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 36: query: insert into test ( i , j , c ) values ( $1 , 1 , 'a ' ); with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 35: using PQexecParams
|
||||
[NO_PID]: ecpg_execute on line 36: using PQexecParams
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: free_params on line 35: parameter 1 = 14
|
||||
[NO_PID]: free_params on line 36: parameter 1 = 14
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 35: OK: INSERT 0 1
|
||||
[NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans on line 36: action "commit"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 37: action "commit"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 39: query: select i from test where j = ( select j from test ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 40: query: select i from test where j = ( select j from test ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 39: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 40: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_check_PQresult on line 39: ERROR: more than one row returned by a subquery used as an expression
|
||||
[NO_PID]: ecpg_check_PQresult on line 40: ERROR: more than one row returned by a subquery used as an expression
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlstate 21000 (sqlcode -284) on line 39: more than one row returned by a subquery used as an expression on line 39
|
||||
[NO_PID]: raising sqlstate 21000 (sqlcode -284) on line 40: more than one row returned by a subquery used as an expression on line 40
|
||||
[NO_PID]: sqlca: code: -284, state: 21000
|
||||
[NO_PID]: ECPGtrans on line 40: action "rollback"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 41: action "rollback"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 43: query: select i from test where j = ( select j from test order by i limit 1 ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 44: query: select i from test where j = ( select j from test order by i limit 1 ); with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 43: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 44: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 43: correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: ecpg_execute on line 44: correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 92: query: declare c cursor for select * from test where i <= $1 ; with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 93: query: declare c cursor for select * from test where i <= $1 ; with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 92: using PQexecParams
|
||||
[NO_PID]: ecpg_execute on line 93: using PQexecParams
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: free_params on line 92: parameter 1 = 14
|
||||
[NO_PID]: free_params on line 93: parameter 1 = 14
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 92: OK: DECLARE CURSOR
|
||||
[NO_PID]: ecpg_execute on line 93: OK: DECLARE CURSOR
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 55: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 55: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: correctly got 1 tuples with 2 fields
|
||||
[NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 3 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_get_data on line 54: RESULT: 7 offset: -1; array: yes
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: 7 offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_get_data on line 54: RESULT: 0 offset: -1; array: yes
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: 0 offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: test offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 55: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: correctly got 1 tuples with 2 fields
|
||||
[NO_PID]: ecpg_execute on line 55: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_get_data on line 54: RESULT: 14 offset: -1; array: yes
|
||||
[NO_PID]: ecpg_execute on line 55: correctly got 1 tuples with 3 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_get_data on line 54: RESULT: 1 offset: -1; array: yes
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: 14 offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: using PQexec
|
||||
[NO_PID]: ecpg_get_data on line 55: RESULT: a offset: -1; array: yes
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 54: correctly got 0 tuples with 2 fields
|
||||
[NO_PID]: ecpg_execute on line 55: query: fetch forward from c; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode 100 on line 54: no data found on line 54
|
||||
[NO_PID]: ecpg_execute on line 55: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 55: correctly got 0 tuples with 3 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode 100 on line 55: no data found on line 55
|
||||
[NO_PID]: sqlca: code: 100, state: 02000
|
||||
[NO_PID]: ecpg_execute on line 72: query: delete from test where i = $1 :: decimal; with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 73: query: delete from test where i = $1 :: decimal; with 1 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 72: using PQexecParams
|
||||
[NO_PID]: ecpg_execute on line 73: using PQexecParams
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: free_params on line 72: parameter 1 = 21.0
|
||||
[NO_PID]: free_params on line 73: parameter 1 = 21.0
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 72: OK: DELETE 0
|
||||
[NO_PID]: ecpg_execute on line 73: OK: DELETE 0
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode 100 on line 72: no data found on line 72
|
||||
[NO_PID]: raising sqlcode 100 on line 73: no data found on line 73
|
||||
[NO_PID]: sqlca: code: 100, state: 02000
|
||||
[NO_PID]: ecpg_execute on line 75: query: select 1 from test where i = 14; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 76: query: select 1 from test where i = 14; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 75: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 76: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 75: correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: ecpg_execute on line 76: correctly got 1 tuples with 1 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 78: query: select 1 from test where i = 147; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 79: query: select 1 from test where i = 147; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 78: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 79: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 78: correctly got 0 tuples with 1 fields
|
||||
[NO_PID]: ecpg_execute on line 79: correctly got 0 tuples with 1 fields
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode 100 on line 78: no data found on line 78
|
||||
[NO_PID]: raising sqlcode 100 on line 79: no data found on line 79
|
||||
[NO_PID]: sqlca: code: 100, state: 02000
|
||||
[NO_PID]: ECPGtrans on line 81: action "commit"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 82: action "commit"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 82: query: drop table test; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: ecpg_execute on line 83: query: drop table test; with 0 parameter(s) on connection regress1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 82: using PQexec
|
||||
[NO_PID]: ecpg_execute on line 83: using PQexec
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_execute on line 82: OK: DROP TABLE
|
||||
[NO_PID]: ecpg_execute on line 83: OK: DROP TABLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGtrans on line 83: action "commit"; connection "regress1"
|
||||
[NO_PID]: ECPGtrans on line 84: action "commit"; connection "regress1"
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: connection regress1 closed
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -1,9 +1,9 @@
|
||||
doSQLprint: Error: duplicate key value violates unique constraint "test_pkey" on line 31
|
||||
INSERT: -239=duplicate key value violates unique constraint "test_pkey" on line 31
|
||||
doSQLprint: Error: more than one row returned by a subquery used as an expression on line 39
|
||||
doSQLprint: Error: duplicate key value violates unique constraint "test_pkey" on line 32
|
||||
INSERT: -239=duplicate key value violates unique constraint "test_pkey" on line 32
|
||||
doSQLprint: Error: more than one row returned by a subquery used as an expression on line 40
|
||||
SELECT: 0=
|
||||
7 0
|
||||
14 1
|
||||
7 0 "test"
|
||||
14 1 "a"
|
||||
DELETE: 100
|
||||
Exists: 0
|
||||
Does not exist: 100
|
||||
|
Reference in New Issue
Block a user