mirror of
https://github.com/postgres/postgres.git
synced 2026-02-25 02:44:39 -05:00
Fix ecpg test program to properly access int* null indicator.
This commit is contained in:
parent
67af5bace5
commit
5cecb734a7
2 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
exec sql whenever sqlerror sqlprint;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue