1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Fix ecpg test program to properly access int* null indicator.

This commit is contained in:
Bruce Momjian
2004-01-13 01:32:52 +00:00
parent 67af5bace5
commit 5cecb734a7
2 changed files with 3 additions and 2 deletions

View File

@ -68,7 +68,7 @@ exec sql end declare section;
printf(", born %ld", personal.birth.born); printf(", born %ld", personal.birth.born);
if (ind_personal.ind_birth.age >= 0) if (ind_personal.ind_birth.age >= 0)
printf(", age = %d", personal.birth.age); printf(", age = %d", personal.birth.age);
if (ind_married >= 0) if (*ind_married >= 0)
printf(", married %10.10s", married->arr); printf(", married %10.10s", married->arr);
if (ind_children >= 0) if (ind_children >= 0)
printf(", children = %d", children); printf(", children = %d", children);
@ -98,7 +98,7 @@ exec sql end declare section;
printf(", born %ld", personal.birth.born); printf(", born %ld", personal.birth.born);
if (ind_personal.ind_birth.age >= 0) if (ind_personal.ind_birth.age >= 0)
printf(", age = %d", personal.birth.age); printf(", age = %d", personal.birth.age);
if (ind_married >= 0) if (*ind_married >= 0)
printf(", married %10.10s", married->arr); printf(", married %10.10s", married->arr);
if (ind_children >= 0) if (ind_children >= 0)
printf(", children = %d", children); printf(", children = %d", children);

View File

@ -1,5 +1,6 @@
#include <locale.h> #include <locale.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
exec sql whenever sqlerror sqlprint; exec sql whenever sqlerror sqlprint;