File tree 6 files changed +21
-24
lines changed
6 files changed +21
-24
lines changed Original file line number Diff line number Diff line change @@ -700,3 +700,8 @@ Fri Oct 29 21:36:25 CEST 1999
700
700
- Fixed bug that caused ecpg to not allow FOR UPDATE.
701
701
- Set ecpg version to 2.6.9
702
702
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.
Original file line number Diff line number Diff line change 6
6
# Copyright (c) 1994, Regents of the University of California
7
7
#
8
8
# 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 $
10
10
#
11
11
# -------------------------------------------------------------------------
12
12
13
13
NAME = ecpg
14
14
SO_MAJOR_VERSION = 3
15
- SO_MINOR_VERSION = 0.4
15
+ SO_MINOR_VERSION = 0.5
16
16
17
17
SRCDIR = @top_srcdir@
18
18
include $(SRCDIR ) /Makefile.global
Original file line number Diff line number Diff line change @@ -1294,7 +1294,7 @@ void
1294
1294
sqlprint (void )
1295
1295
{
1296
1296
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 );
1298
1298
}
1299
1299
1300
1300
static bool
Original file line number Diff line number Diff line change 1
- all : test1 test2 test3 perftest
1
+ all : test1 test2 test3 test4 perftest
2
2
3
3
LDFLAGS =-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq -lcrypt
4
4
5
- test1 : test1.c
6
- test1.c : test1.pgc
7
- /usr/local/pgsql/bin/ecpg $?
5
+ .SUFFIXES : .pgc .c
8
6
7
+ test1 : test1.c
9
8
test2 : test2.c
10
- test2.c : test2.pgc
11
- /usr/local/pgsql/bin/ecpg $?
12
-
13
9
test3 : test3.c
14
- test3.c : test3.pgc
15
- /usr/local/pgsql/bin/ecpg $?
16
-
10
+ test4 : test4.c
17
11
perftest : perftest.c
18
- perftest.c :perftest.pgc
12
+
13
+ .pgc.c :
19
14
/usr/local/pgsql/bin/ecpg $?
20
15
21
16
clean :
22
- -/bin/rm test1 test2 test3 perftest * .c log
17
+ -/bin/rm test1 test2 test3 test4 perftest * .c log
Original file line number Diff line number Diff line change 1
1
exec sql include sqlca ;
2
2
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 ();
9
5
10
- void PrintAndStop (void )
6
+ void PrintAndStop (msg )
11
7
{
8
+ fprintf (stderr , "Error in statement '%s':\n" , msg );
12
9
sqlprint ();
13
10
exit (-1 );
14
11
}
15
12
16
- void warn (void )
13
+ void warn (void )
17
14
{
18
15
fprintf (stderr , "Warning: At least one column was truncated\n" );
19
16
}
Original file line number Diff line number Diff line change 1
- exec sql whenever sqlerror sqlprint ;
1
+ exec sql include header_test ;
2
2
3
3
exec sql include sqlca;
4
4
You can’t perform that action at this time.
0 commit comments