*** 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

@ -700,3 +700,8 @@ Fri Oct 29 21:36:25 CEST 1999
- Fixed bug that caused ecpg to not allow FOR UPDATE. - Fixed bug that caused ecpg to not allow FOR UPDATE.
- Set ecpg version to 2.6.9 - 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.

View File

@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # 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 NAME= ecpg
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 0.4 SO_MINOR_VERSION= 0.5
SRCDIR= @top_srcdir@ SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global

View File

@ -1294,7 +1294,7 @@ void
sqlprint(void) sqlprint(void)
{ {
sqlca.sqlerrm.sqlerrmc[sqlca.sqlerrm.sqlerrml] = '\0'; 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 static bool

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 LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq -lcrypt
.SUFFIXES: .pgc .c
test1: test1.c test1: test1.c
test1.c: test1.pgc
/usr/local/pgsql/bin/ecpg $?
test2: test2.c test2: test2.c
test2.c: test2.pgc
/usr/local/pgsql/bin/ecpg $?
test3: test3.c test3: test3.c
test3.c: test3.pgc test4: test4.c
/usr/local/pgsql/bin/ecpg $?
perftest: perftest.c perftest: perftest.c
perftest.c:perftest.pgc
.pgc.c:
/usr/local/pgsql/bin/ecpg $? /usr/local/pgsql/bin/ecpg $?
clean: 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 include sqlca;
exec sql whenever sqlerror exec sql whenever sqlerror do PrintAndStop(msg);
do exec sql whenever sqlwarning do warn();
PrintAndStop();
exec sql whenever sqlwarning
do
warn();
void PrintAndStop(void) void PrintAndStop(msg)
{ {
fprintf(stderr, "Error in statement '%s':\n", msg);
sqlprint(); sqlprint();
exit(-1); exit(-1);
} }
void warn(void) void warn(void)
{ {
fprintf(stderr, "Warning: At least one column was truncated\n"); 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; exec sql include sqlca;