Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7ff8a18

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent d9e4966 commit 7ff8a18

File tree

6 files changed

+21
-24
lines changed

6 files changed

+21
-24
lines changed

src/interfaces/ecpg/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -700,3 +700,8 @@ Fri Oct 29 21:36:25 CEST 1999
700700
- Fixed bug that caused ecpg to not allow FOR UPDATE.
701701
- Set ecpg version to 2.6.9
702702

703+
Mon Nov 1 11:22:06 CET 1999
704+
705+
- Print SQL error message to STDERR instead of STDOUT.
706+
- Added a fourth test source.
707+
- Set library version to 3.0.5.

src/interfaces/ecpg/lib/Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.49 1999/10/13 11:38:35 momjian Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.50 1999/11/02 12:11:53 meskes Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

1313
NAME= ecpg
1414
SO_MAJOR_VERSION= 3
15-
SO_MINOR_VERSION= 0.4
15+
SO_MINOR_VERSION= 0.5
1616

1717
SRCDIR= @top_srcdir@
1818
include $(SRCDIR)/Makefile.global

src/interfaces/ecpg/lib/ecpglib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ void
12941294
sqlprint(void)
12951295
{
12961296
sqlca.sqlerrm.sqlerrmc[sqlca.sqlerrm.sqlerrml] = '\0';
1297-
printf("sql error %s\n", sqlca.sqlerrm.sqlerrmc);
1297+
fprintf(stderr, "sql error %s\n", sqlca.sqlerrm.sqlerrmc);
12981298
}
12991299

13001300
static bool

src/interfaces/ecpg/test/Makefile

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
all: test1 test2 test3 perftest
1+
all: test1 test2 test3 test4 perftest
22

33
LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq -lcrypt
44

5-
test1: test1.c
6-
test1.c: test1.pgc
7-
/usr/local/pgsql/bin/ecpg $?
5+
.SUFFIXES: .pgc .c
86

7+
test1: test1.c
98
test2: test2.c
10-
test2.c: test2.pgc
11-
/usr/local/pgsql/bin/ecpg $?
12-
139
test3: test3.c
14-
test3.c: test3.pgc
15-
/usr/local/pgsql/bin/ecpg $?
16-
10+
test4: test4.c
1711
perftest: perftest.c
18-
perftest.c:perftest.pgc
12+
13+
.pgc.c:
1914
/usr/local/pgsql/bin/ecpg $?
2015

2116
clean:
22-
-/bin/rm test1 test2 test3 perftest *.c log
17+
-/bin/rm test1 test2 test3 test4 perftest *.c log
+5-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
exec sql include sqlca;
22

3-
exec sql whenever sqlerror
4-
do
5-
PrintAndStop();
6-
exec sql whenever sqlwarning
7-
do
8-
warn();
3+
exec sql whenever sqlerror do PrintAndStop(msg);
4+
exec sql whenever sqlwarning do warn();
95

10-
void PrintAndStop(void)
6+
void PrintAndStop(msg)
117
{
8+
fprintf(stderr, "Error in statement '%s':\n", msg);
129
sqlprint();
1310
exit(-1);
1411
}
1512

16-
void warn(void)
13+
void warn(void)
1714
{
1815
fprintf(stderr, "Warning: At least one column was truncated\n");
1916
}

src/interfaces/ecpg/test/test1.pgc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exec sql whenever sqlerror sqlprint;
1+
exec sql include header_test;
22

33
exec sql include sqlca;
44

0 commit comments

Comments
 (0)