Skip to content

Commit 676404d

Browse files
committed
Add pginterface into main tree, called pgeasy.
1 parent 6da92d9 commit 676404d

File tree

19 files changed

+144
-71
lines changed

19 files changed

+144
-71
lines changed

contrib/README

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ mSQL-interface -
5050
noupdate -
5151
trigger to prevent updates on single columns
5252

53-
plpgsql -
54-
Postgres procedural language
55-
by Jan Wieck <jwieck@debis.com>
56-
57-
pginterface -
58-
A crude C/4GL
59-
by Bruce Momjian <root@candle.pha.pa.us>
60-
6153
soundex -
6254
Prototype for soundex function
6355

contrib/findoidjoins/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and the tables they join to. CAUTION: it is ver-r-r-y slow on a large
66
database, or even a not-so-large one. We don't really recommend running
77
it on anything but an empty database.
88

9-
It requires pgsql/contrib/pginterface to be compiled first.
9+
Uses pgeasy library.
1010

1111
Run on an empty database, it returns the system join relationships (shown
1212
below for 6.5). Note that unexpected matches may indicate bogus entries

contrib/pginterface/Makefile

Lines changed: 0 additions & 32 deletions
This file was deleted.

contrib/pginterface/README

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ AC_OUTPUT(
12201220
interfaces/libpq/Makefile
12211221
interfaces/ecpg/lib/Makefile
12221222
interfaces/libpq++/Makefile
1223+
interfaces/libpgeasy/Makefile
12231224
interfaces/libpgtcl/Makefile
12241225
interfaces/odbc/GNUmakefile
12251226
interfaces/odbc/Makefile.global

src/interfaces/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.27 1999/10/08 04:28:57 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.28 1999/10/11 17:46:58 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -44,6 +44,7 @@ endif
4444
ifeq ($(USE_ODBC), true)
4545
$(MAKE) -C odbc $@
4646
endif
47+
$(MAKE) -C pgeasy$@
4748

4849
perl5/Makefile: perl5/Makefile.PL
4950
cd perl5 && $(PERL) Makefile.PL

src/interfaces/libpgtcl/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.35 1999/06/30 23:57:24 tgl Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.36 1999/10/11 17:46:59 momjian Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -52,7 +52,7 @@ beforeinstall-headers:
5252
.PHONY: clean
5353

5454
clean: clean-shlib
55-
rm -f $(OBJS) lib$(NAME).a
55+
rm -f lib$(NAME).a $(OBJS)
5656

5757
depend dep:
5858
$(CC) -MM $(CFLAGS) *.c >depend

src/interfaces/libpq/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.47 1999/08/31 01:37:36 tgl Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.48 1999/10/11 17:47:01 momjian Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -86,7 +86,7 @@ install-headers: libpq-fe.h libpq-int.h
8686
.PHONY: clean
8787

8888
clean: clean-shlib
89-
rm -f libpq.a $(OBJS)
89+
rm -f lib$(NAME).a $(OBJS)
9090
rm -f dllist.c common.c wchar.c conv.c big5.c
9191
ifeq ($(PORTNAME), win)
9292
rm -f pq.def

src/interfaces/pgeasy/Makefile.in

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile
4+
# Makefile for pgeasy library
5+
#
6+
# IDENTIFICATION
7+
# $Header: /cvsroot/pgsql/src/interfaces/pgeasy/Attic/Makefile.in,v 1.1 1999/10/11 17:47:01 momjian Exp $
8+
#
9+
#-------------------------------------------------------------------------
10+
11+
NAME= pgeasy
12+
SO_MAJOR_VERSION= 2
13+
SO_MINOR_VERSION= 0
14+
15+
SRCDIR= @top_srcdir@
16+
include $(SRCDIR)/Makefile.global
17+
18+
ifdef KRBVERS
19+
CFLAGS+= $(KRBFLAGS)
20+
endif
21+
22+
OBJS= pgeasy.o halt.o
23+
24+
SHLIB_LINK+= -L../libpq -lpq
25+
26+
SHLIB_LINK+= -L../libpq -lpq
27+
28+
# If crypt is a separate library, rather than part of libc, it may need
29+
# to be referenced separately to keep (broken) linkers happy. (This is
30+
# braindead; users of libpq should not need to know what it depends on.)
31+
SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
32+
33+
# Shared library stuff, also default 'all' target
34+
include $(SRCDIR)/Makefile.shlib
35+
36+
37+
.PHONY: install install-headers
38+
39+
install: install-headers install-lib $(install-shlib-dep)
40+
41+
install-headers: pgeasy.h
42+
@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
43+
$(INSTALL) $(INSTLOPTS) pgeasy.h $(HEADERDIR)/pgeasy.h
44+
45+
.PHONY: clean
46+
47+
clean: clean-shlib
48+
rm -f lib$(NAME).a $(OBJS)
49+
50+
depend dep:
51+
$(CC) -MM $(CFLAGS) *.c >depend
52+
53+
ifeq (depend,$(wildcard depend))
54+
include depend
55+
endif
56+
57+
58+
59+
PGEASY = pgeasy.o halt.o
60+
TARGET = libpgeasy.a pginsert pgwordcount pgnulltest
61+
CFLAGS = -g -Wall -I. -I../../src/interfaces/libpq -I/usr/local/pgsql/include
62+
LDFLAGS = -L/usr/local/pgsql/lib -lpq
63+
64+
all : $(TARGET)
65+
66+
libpgeasy.a: pgeasy.o halt.o
67+
ar r libpgeasy.a pgeasy.o halt.o
68+
69+
pgeasy.o: pgeasy.c
70+
gcc -c $(CFLAGS) pgeasy.c
71+
72+
halt.o: halt.c
73+
gcc -c $(CFLAGS) halt.c
74+
75+
pginsert: $(PGEASY) pginsert.c
76+
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
77+
78+
pgwordcount: $(PGEASY) pgwordcount.c
79+
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
80+
81+
pgnulltest: $(PGEASY) pgnulltest.c
82+
gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
83+
84+
clean:
85+
rm -f *.o $(TARGET) log core
86+
87+
install:
88+
install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin
89+

src/interfaces/pgeasy/README

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
3+
Pgeasy 2.0
4+
(Formerly contrib/pginterface)
5+
6+
Attached is a copy of the Postgres support routines I wrote to allow me
7+
to more cleanly interface to the libpg library, more like a 4gl SQL
8+
interface.
9+
10+
Bruce Momjian (root@candle.pha.pa.us)

0 commit comments

Comments
 (0)