1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

*** empty log message ***

This commit is contained in:
Michael Meskes
1999-11-02 12:11:53 +00:00
parent d9e4966be1
commit 7ff8a18030
6 changed files with 21 additions and 24 deletions

View File

@ -1,22 +1,17 @@
all: test1 test2 test3 perftest
all: test1 test2 test3 test4 perftest
LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq -lcrypt
.SUFFIXES: .pgc .c
test1: test1.c
test1.c: test1.pgc
/usr/local/pgsql/bin/ecpg $?
test2: test2.c
test2.c: test2.pgc
/usr/local/pgsql/bin/ecpg $?
test3: test3.c
test3.c: test3.pgc
/usr/local/pgsql/bin/ecpg $?
test4: test4.c
perftest: perftest.c
perftest.c:perftest.pgc
.pgc.c:
/usr/local/pgsql/bin/ecpg $?
clean:
-/bin/rm test1 test2 test3 perftest *.c log
-/bin/rm test1 test2 test3 test4 perftest *.c log

View File

@ -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");
}

View File

@ -1,4 +1,4 @@
exec sql whenever sqlerror sqlprint;
exec sql include header_test;
exec sql include sqlca;