diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-01-13 01:32:52 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-01-13 01:32:52 +0000 |
commit | 5cecb734a76e01b5d75cfcbfb95e2a244b2e96a8 (patch) | |
tree | f78a75fec1a18439aabd20af2de99289aab1d622 /src | |
parent | 67af5bace5df0b3b0126df71ec8007494901e80c (diff) | |
download | postgresql-5cecb734a76e01b5d75cfcbfb95e2a244b2e96a8.tar.gz postgresql-5cecb734a76e01b5d75cfcbfb95e2a244b2e96a8.zip |
Fix ecpg test program to properly access int* null indicator.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/test/test3.pgc | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/test4.pgc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/test3.pgc b/src/interfaces/ecpg/test/test3.pgc index 2cdde342003..46e9d4904ab 100644 --- a/src/interfaces/ecpg/test/test3.pgc +++ b/src/interfaces/ecpg/test/test3.pgc @@ -68,7 +68,7 @@ exec sql end declare section; printf(", born %ld", personal.birth.born); if (ind_personal.ind_birth.age >= 0) printf(", age = %d", personal.birth.age); - if (ind_married >= 0) + if (*ind_married >= 0) printf(", married %10.10s", married->arr); if (ind_children >= 0) printf(", children = %d", children); @@ -98,7 +98,7 @@ exec sql end declare section; printf(", born %ld", personal.birth.born); if (ind_personal.ind_birth.age >= 0) printf(", age = %d", personal.birth.age); - if (ind_married >= 0) + if (*ind_married >= 0) printf(", married %10.10s", married->arr); if (ind_children >= 0) printf(", children = %d", children); diff --git a/src/interfaces/ecpg/test/test4.pgc b/src/interfaces/ecpg/test/test4.pgc index 7a4c49df53f..10a5fdca1cf 100644 --- a/src/interfaces/ecpg/test/test4.pgc +++ b/src/interfaces/ecpg/test/test4.pgc @@ -1,5 +1,6 @@ #include <locale.h> #include <string.h> +#include <stdlib.h> exec sql whenever sqlerror sqlprint; |