mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
*** empty log message ***
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
exec sql include sqlca;
|
||||
|
||||
exec sql whenever sqlerror
|
||||
do
|
||||
PrintAndStop();
|
||||
exec sql whenever sqlwarning
|
||||
do
|
||||
warn();
|
||||
exec sql whenever sqlerror do PrintAndStop(msg);
|
||||
exec sql whenever sqlwarning do warn();
|
||||
|
||||
void PrintAndStop(void)
|
||||
void PrintAndStop(msg)
|
||||
{
|
||||
fprintf(stderr, "Error in statement '%s':\n", msg);
|
||||
sqlprint();
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
void warn(void)
|
||||
void warn(void)
|
||||
{
|
||||
fprintf(stderr, "Warning: At least one column was truncated\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user