diff options
author | Michael Meskes <meskes@postgresql.org> | 2015-02-10 12:00:13 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2015-02-10 12:04:10 +0100 |
commit | 1f393fc923ec77f25fd37e16fd8ccb480df82ebb (patch) | |
tree | e771707dfd308ec99087cdfb601bdb74c07ef032 /src/interfaces/ecpg/test/sql/oldexec.pgc | |
parent | 025c02420de990c15a90e9e3f86fcfbc5b59ee88 (diff) | |
download | postgresql-1f393fc923ec77f25fd37e16fd8ccb480df82ebb.tar.gz postgresql-1f393fc923ec77f25fd37e16fd8ccb480df82ebb.zip |
Fixed array handling in ecpg.
When ecpg was rewritten to the new protocol version not all variable types
were corrected. This patch rewrites the code for these types to fix that. It
also fixes the documentation to correctly tell the status of array handling.
Diffstat (limited to 'src/interfaces/ecpg/test/sql/oldexec.pgc')
-rw-r--r-- | src/interfaces/ecpg/test/sql/oldexec.pgc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/test/sql/oldexec.pgc b/src/interfaces/ecpg/test/sql/oldexec.pgc index a740aeb7de0..2988f2ab8a4 100644 --- a/src/interfaces/ecpg/test/sql/oldexec.pgc +++ b/src/interfaces/ecpg/test/sql/oldexec.pgc @@ -22,6 +22,7 @@ exec sql end declare section; ECPGdebug(1, stderr); exec sql connect to REGRESSDB1 as main; + exec sql create table test (name char(8), amount int, letter char(1)); exec sql commit; @@ -54,10 +55,8 @@ exec sql end declare section; for (i=0, j=sqlca.sqlerrd[2]; i<j; i++) { - exec sql begin declare section; char n[8], l = letter[i][0]; int a = amount[i]; - exec sql end declare section; strncpy(n, name[i], 8); printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l); @@ -75,10 +74,8 @@ exec sql end declare section; for (i=0, j=sqlca.sqlerrd[2]; i<j; i++) { - exec sql begin declare section; char n[8], l = letter[i][0]; int a = amount[i]; - exec sql end declare section; strncpy(n, name[i], 8); printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l); |