mirror of
https://github.com/postgres/postgres.git
synced 2026-03-03 22:00:57 -05:00
15 lines
255 B
C
15 lines
255 B
C
exec sql include sqlca;
|
|
|
|
exec sql whenever sqlerror do print_and_stop();
|
|
exec sql whenever sqlwarning do warn();
|
|
|
|
void print_and_stop(void)
|
|
{
|
|
sqlprint();
|
|
exit(-1);
|
|
}
|
|
|
|
void warn(void)
|
|
{
|
|
fprintf(stderr, "Warning: At least one column was truncated\n");
|
|
}
|