- Fixed bug that caused ecpg to not allow FOR UPDATE.
- Set ecpg version to 2.6.9
+Mon Nov 1 11:22:06 CET 1999
+
+ - Print SQL error message to STDERR instead of STDOUT.
+ - Added a fourth test source.
+ - Set library version to 3.0.5.
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.49 1999/10/13 11:38:35 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.50 1999/11/02 12:11:53 meskes Exp $
#
#-------------------------------------------------------------------------
NAME= ecpg
SO_MAJOR_VERSION= 3
-SO_MINOR_VERSION= 0.4
+SO_MINOR_VERSION= 0.5
SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
sqlprint(void)
{
sqlca.sqlerrm.sqlerrmc[sqlca.sqlerrm.sqlerrml] = '\0';
- printf("sql error %s\n", sqlca.sqlerrm.sqlerrmc);
+ fprintf(stderr, "sql error %s\n", sqlca.sqlerrm.sqlerrmc);
}
static bool
-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
-test1: test1.c
-test1.c: test1.pgc
- /usr/local/pgsql/bin/ecpg $?
+.SUFFIXES: .pgc .c
+test1: test1.c
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
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");
}
-exec sql whenever sqlerror sqlprint;
+exec sql include header_test;
exec sql include sqlca;