1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00
See attached file. Now accepts "exec sql whenever sqlwarning".
This commit is contained in:
Marc G. Fournier
1999-01-21 20:01:34 +00:00
parent 1f37905681
commit cdbaec771c
6 changed files with 51 additions and 18 deletions

View File

@ -1,3 +1,15 @@
exec sql include sqlca;
exec sql whenever sqlerror sqlprint;
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");
}