Commit 0347dcc8 authored by Bruce Momjian's avatar Bruce Momjian

Okay, I've updated the ecpg parser yet again. Unfortunately it has one

remaining shift/reduce conflict. But the very same conflict is in gram.y, so
I don't dig into it very much now.

Anyway, I just saw that there were minor changes made to ecpg by others. Now
I like that but I would prefer if I was told about that. Otherwise my
version numbering and Changelog maintaining might break. Or simply change
these too. :-)

Also I had to add #include <errno.h> to  backend/libpq/pqcomprim.c to be
able to compile postgresql.

Patch is attached. Since my resubscription process is still not finished
yet, I still send them here.

Michael
parent 909c5197
...@@ -371,4 +371,9 @@ Tue Jan 7 15:19:34 CET 1999 ...@@ -371,4 +371,9 @@ Tue Jan 7 15:19:34 CET 1999
- Synced preproc.y with gram.y for for-update clause and changes in - Synced preproc.y with gram.y for for-update clause and changes in
handling of numerics handling of numerics
Mon Jan 18 11:22:44 CET 1999
- Added INTERSECT, EXCEPT and UNION for Select statements
- Put keywords.c in sync again after forgettimg it the last time.
- Set version to 2.4.6 - Set version to 2.4.6
#include <c.h> #include <postgres.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
......
...@@ -3,7 +3,7 @@ include $(SRCDIR)/Makefile.global ...@@ -3,7 +3,7 @@ include $(SRCDIR)/Makefile.global
MAJOR_VERSION=2 MAJOR_VERSION=2
MINOR_VERSION=4 MINOR_VERSION=4
PATCHLEVEL=5 PATCHLEVEL=6
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \ CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \ -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.7 1998/12/22 18:50:55 scrappy Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.8 1999/01/18 17:17:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -94,6 +94,8 @@ static ScanKeyword ScanKeywords[] = { ...@@ -94,6 +94,8 @@ static ScanKeyword ScanKeywords[] = {
{"else", ELSE}, {"else", ELSE},
{"encoding", ENCODING}, {"encoding", ENCODING},
{"end", END_TRANS}, {"end", END_TRANS},
/***S*I***/
{"except", EXCEPT},
{"execute", EXECUTE}, {"execute", EXECUTE},
{"exists", EXISTS}, {"exists", EXISTS},
{"explain", EXPLAIN}, {"explain", EXPLAIN},
...@@ -121,16 +123,20 @@ static ScanKeyword ScanKeywords[] = { ...@@ -121,16 +123,20 @@ static ScanKeyword ScanKeywords[] = {
{"insensitive", INSENSITIVE}, {"insensitive", INSENSITIVE},
{"insert", INSERT}, {"insert", INSERT},
{"instead", INSTEAD}, {"instead", INSTEAD},
/***S*I***/
{"intersect", INTERSECT},
{"interval", INTERVAL}, {"interval", INTERVAL},
{"into", INTO}, {"into", INTO},
{"is", IS}, {"is", IS},
{"isnull", ISNULL}, {"isnull", ISNULL},
{"isolation", ISOLATION},
{"join", JOIN}, {"join", JOIN},
{"key", KEY}, {"key", KEY},
{"lancompiler", LANCOMPILER}, {"lancompiler", LANCOMPILER},
{"language", LANGUAGE}, {"language", LANGUAGE},
{"leading", LEADING}, {"leading", LEADING},
{"left", LEFT}, {"left", LEFT},
{"level", LEVEL},
{"like", LIKE}, {"like", LIKE},
{"listen", LISTEN}, {"listen", LISTEN},
{"load", LOAD}, {"load", LOAD},
......
This diff is collapsed.
all: test1 test2 perftest all: test1 test2 perftest
LDFLAGS=-g -I ../include -I ../../libpq -L../lib -lecpg -L../../libpq -lpq -lcrypt LDFLAGS=-g -I /usr/local/pgsql/include -L/usr/local/pgsql/lib -lecpg -lpq -lcrypt
test1: test1.c test1: test1.c
test1.c: test1.pgc test1.c: test1.pgc
../preproc/ecpg $? /usr/local/pgsql/bin/ecpg $?
test2: test2.c test2: test2.c
test2.c: test2.pgc test2.c: test2.pgc
../preproc/ecpg $? /usr/local/pgsql/bin/ecpg $?
perftest: perftest.c perftest: perftest.c
perftest.c:perftest.pgc perftest.c:perftest.pgc
../preproc/ecpg $? /usr/local/pgsql/bin/ecpg $?
clean: clean:
/bin/rm test1 test2 perftest *.c log /bin/rm test1 test2 perftest *.c log
...@@ -30,14 +30,14 @@ exec sql declare cur cursor for ...@@ -30,14 +30,14 @@ exec sql declare cur cursor for
ECPGdebug(1, dbgs); ECPGdebug(1, dbgs);
strcpy(msg, "connect"); strcpy(msg, "connect");
exec sql connect to tcp:postgresql://localhost:5432/mm; exec sql connect to unix:postgresql://localhost:5432/mm;
strcpy(msg, "create"); strcpy(msg, "create");
exec sql create table meskes(name char(8), born integer, age smallint, married char(8)); exec sql create table meskes(name char(8), born integer, age smallint, married char(8));
strcpy(msg, "insert"); strcpy(msg, "insert");
exec sql insert into meskes(name, born, age, married) values ('Petra', 19661202, 31, '19900404'); exec sql insert into meskes(name, born, age, married) values ('Petra', 19661202, 32, '19900404');
exec sql insert into meskes(name, born, age, married) values ('Michael', 19660117, 32, '19900404'); exec sql insert into meskes(name, born, age, married) values ('Michael', 19660117, 33, '19900404');
exec sql insert into meskes(name, born, age) values ('Carsten', 19910103, 7); exec sql insert into meskes(name, born, age) values ('Carsten', 19910103, 7);
exec sql insert into meskes(name, born, age) values ('Marc', 19930907, 4); exec sql insert into meskes(name, born, age) values ('Marc', 19930907, 4);
exec sql insert into meskes(name, born, age) values ('Chris', 19970923, 0); exec sql insert into meskes(name, born, age) values ('Chris', 19970923, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment