]> granicus.if.org Git - postgresql/commitdiff
Add pginterface into main tree, called pgeasy.
authorBruce Momjian <bruce@momjian.us>
Mon, 11 Oct 1999 17:47:02 +0000 (17:47 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 11 Oct 1999 17:47:02 +0000 (17:47 +0000)
19 files changed:
contrib/README
contrib/findoidjoins/README
contrib/pginterface/Makefile [deleted file]
contrib/pginterface/README [deleted file]
src/configure.in
src/interfaces/Makefile
src/interfaces/libpgtcl/Makefile.in
src/interfaces/libpq/Makefile.in
src/interfaces/pgeasy/Makefile.in [new file with mode: 0644]
src/interfaces/pgeasy/README [new file with mode: 0644]
src/interfaces/pgeasy/examples/Makefile [new file with mode: 0644]
src/interfaces/pgeasy/examples/pginsert.c [moved from contrib/pginterface/pginsert.c with 98% similarity]
src/interfaces/pgeasy/examples/pgnulltest.c [moved from contrib/pginterface/pgnulltest.c with 99% similarity]
src/interfaces/pgeasy/examples/pgwordcount.c [moved from contrib/pginterface/pgwordcount.c with 97% similarity]
src/interfaces/pgeasy/halt.c [moved from contrib/pginterface/halt.c with 100% similarity]
src/interfaces/pgeasy/halt.h [moved from contrib/pginterface/halt.h with 100% similarity]
src/interfaces/pgeasy/pgeasy.3 [moved from contrib/pginterface/pginterface.3 with 87% similarity]
src/interfaces/pgeasy/pgeasy.c [moved from contrib/pginterface/pginterface.c with 99% similarity]
src/interfaces/pgeasy/pgeasy.h [moved from contrib/pginterface/pginterface.h with 100% similarity]

index af9747644b07709c7bf7f4cc959481b8bf8cdf99..a59880c2653e74748dfb33a7ca8bde4e1af6f2f5 100644 (file)
@@ -50,14 +50,6 @@ mSQL-interface -
 noupdate -
        trigger to prevent updates on single columns
 
-plpgsql - 
-       Postgres procedural language
-       by Jan Wieck <jwieck@debis.com>
-
-pginterface -
-       A crude C/4GL
-       by Bruce Momjian <root@candle.pha.pa.us>
-
 soundex -
        Prototype for soundex function
 
index 26086a6c4159a59c4400ac442d7fb1e6f92e2953..c67d341339dbc1edefe56096babe323555e9d2b0 100644 (file)
@@ -6,7 +6,7 @@ and the tables they join to.  CAUTION: it is ver-r-r-y slow on a large
 database, or even a not-so-large one.  We don't really recommend running
 it on anything but an empty database.
 
-It requires pgsql/contrib/pginterface to be compiled first.
+Uses pgeasy library.
 
 Run on an empty database, it returns the system join relationships (shown
 below for 6.5).  Note that unexpected matches may indicate bogus entries
diff --git a/contrib/pginterface/Makefile b/contrib/pginterface/Makefile
deleted file mode 100644 (file)
index eea02e8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Makefile
-#
-#
-PGINTERFACE = pginterface.o halt.o 
-TARGET = pginsert pgwordcount pgnulltest
-CFLAGS = -g -Wall -I. -I../../src/interfaces/libpq  -I/usr/local/pgsql/include
-LDFLAGS = -L/usr/local/pgsql/lib -lpq
-
-all : $(TARGET)
-
-pginsert:      $(PGINTERFACE) pginsert.c
-       gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
-
-pgwordcount:   $(PGINTERFACE) pgwordcount.c
-       gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
-
-pgnulltest:    $(PGINTERFACE) pgnulltest.c
-       gcc -o $@ $(CFLAGS) $@.c $(PGINTERFACE) $(LDFLAGS)
-
-pginterface.o: pginterface.c
-       gcc -c $(CFLAGS) pginterface.c
-
-halt.o:        halt.c
-       gcc -c $(CFLAGS) halt.c
-
-clean:
-       rm -f *.o $(TARGET) log core
-
-install:
-       install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin
-
diff --git a/contrib/pginterface/README b/contrib/pginterface/README
deleted file mode 100644 (file)
index 5190acc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-                             Pginterface 2.0
-
-Attached is a copy of the Postgres support routines I wrote to allow me
-to more cleanly interface to the libpg library, more like a 4gl SQL
-interface.
-
-You can create a library of pginterface.c and halt.c, and just include
-pginterface.h in your source code.
-
-I am willing to maintain this if people find problems or want additional
-functionality. 
-
-Bruce Momjian (root@candle.pha.pa.us)
index a02a46778f6aa635810b77f3691e9eb87520cb80..115096f724fddea00b56959fca961a87af111970 100644 (file)
@@ -1220,6 +1220,7 @@ AC_OUTPUT(
        interfaces/libpq/Makefile
        interfaces/ecpg/lib/Makefile
        interfaces/libpq++/Makefile
+       interfaces/libpgeasy/Makefile
        interfaces/libpgtcl/Makefile
        interfaces/odbc/GNUmakefile
        interfaces/odbc/Makefile.global
index 632ae7832d10859057c322a40ec9db0a8dac1e67..ae54cd29d034b1fc63bb05e5d9056443e373a425 100644 (file)
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.27 1999/10/08 04:28:57 momjian Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.28 1999/10/11 17:46:58 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -44,6 +44,7 @@ endif
 ifeq ($(USE_ODBC), true)
        $(MAKE) -C odbc $@
 endif
+       $(MAKE) -C pgeasy$@
 
 perl5/Makefile: perl5/Makefile.PL
        cd perl5 && $(PERL) Makefile.PL
index 1912c1198caa347b25a1e10846802731710623a0..7e351603802a985c7c61640850d26b5540820cde 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1994, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.35 1999/06/30 23:57:24 tgl Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.36 1999/10/11 17:46:59 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -52,7 +52,7 @@ beforeinstall-headers:
 .PHONY: clean
 
 clean: clean-shlib
-       rm -f $(OBJS) lib$(NAME).a
+       rm -f lib$(NAME).a $(OBJS)
 
 depend dep:
        $(CC) -MM $(CFLAGS) *.c >depend
index ec955dcd4bc1fc5e103e37ae4dafa897209cc8fc..e67ee1d2caa2069819c94ec9c10c64d502404a84 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1994, Regents of the University of California
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.47 1999/08/31 01:37:36 tgl Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.48 1999/10/11 17:47:01 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -86,7 +86,7 @@ install-headers: libpq-fe.h libpq-int.h
 .PHONY: clean
 
 clean: clean-shlib
-       rm -f libpq.a $(OBJS)
+       rm -f lib$(NAME).a $(OBJS)
        rm -f dllist.c common.c wchar.c conv.c big5.c
 ifeq ($(PORTNAME), win)
        rm -f pq.def
diff --git a/src/interfaces/pgeasy/Makefile.in b/src/interfaces/pgeasy/Makefile.in
new file mode 100644 (file)
index 0000000..f535e46
--- /dev/null
@@ -0,0 +1,89 @@
+#-------------------------------------------------------------------------
+#
+# Makefile
+#    Makefile for pgeasy library
+#
+# IDENTIFICATION
+#    $Header: /cvsroot/pgsql/src/interfaces/pgeasy/Attic/Makefile.in,v 1.1 1999/10/11 17:47:01 momjian Exp $
+#
+#-------------------------------------------------------------------------
+
+NAME= pgeasy
+SO_MAJOR_VERSION= 2
+SO_MINOR_VERSION= 0
+
+SRCDIR= @top_srcdir@
+include $(SRCDIR)/Makefile.global
+
+ifdef KRBVERS
+CFLAGS+= $(KRBFLAGS)
+endif
+
+OBJS= pgeasy.o halt.o
+
+SHLIB_LINK+= -L../libpq -lpq
+
+SHLIB_LINK+= -L../libpq -lpq
+
+# If crypt is a separate library, rather than part of libc, it may need
+# to be referenced separately to keep (broken) linkers happy.  (This is
+# braindead; users of libpq should not need to know what it depends on.)
+SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
+
+# Shared library stuff, also default 'all' target
+include $(SRCDIR)/Makefile.shlib
+
+
+.PHONY: install install-headers
+
+install: install-headers install-lib $(install-shlib-dep)
+
+install-headers: pgeasy.h
+       @if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
+       $(INSTALL) $(INSTLOPTS) pgeasy.h $(HEADERDIR)/pgeasy.h
+
+.PHONY: clean
+
+clean: clean-shlib
+       rm -f lib$(NAME).a $(OBJS)
+
+depend dep:
+       $(CC) -MM $(CFLAGS) *.c >depend
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif
+
+
+
+PGEASY = pgeasy.o halt.o 
+TARGET = libpgeasy.a pginsert pgwordcount pgnulltest
+CFLAGS = -g -Wall -I. -I../../src/interfaces/libpq  -I/usr/local/pgsql/include
+LDFLAGS = -L/usr/local/pgsql/lib -lpq
+
+all : $(TARGET)
+
+libpgeasy.a:   pgeasy.o halt.o
+       ar r libpgeasy.a pgeasy.o halt.o
+
+pgeasy.o:      pgeasy.c
+       gcc -c $(CFLAGS) pgeasy.c
+
+halt.o:        halt.c
+       gcc -c $(CFLAGS) halt.c
+
+pginsert:      $(PGEASY) pginsert.c
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+pgwordcount:   $(PGEASY) pgwordcount.c
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+pgnulltest:    $(PGEASY) pgnulltest.c
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+clean:
+       rm -f *.o $(TARGET) log core
+
+install:
+       install -s -o bin -g bin $(TARGET) /usr/local/pgsql/bin
+
diff --git a/src/interfaces/pgeasy/README b/src/interfaces/pgeasy/README
new file mode 100644 (file)
index 0000000..b8e26d4
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+                             Pgeasy 2.0
+                   (Formerly contrib/pginterface)
+
+Attached is a copy of the Postgres support routines I wrote to allow me
+to more cleanly interface to the libpg library, more like a 4gl SQL
+interface.
+
+Bruce Momjian (root@candle.pha.pa.us)
diff --git a/src/interfaces/pgeasy/examples/Makefile b/src/interfaces/pgeasy/examples/Makefile
new file mode 100644 (file)
index 0000000..fd13c1e
--- /dev/null
@@ -0,0 +1,27 @@
+#-------------------------------------------------------------------------
+#
+# Makefile
+#    Makefile for pgeasy examples
+#
+# IDENTIFICATION
+#    $Header: /cvsroot/pgsql/src/interfaces/pgeasy/examples/Attic/Makefile,v 1.1 1999/10/11 17:47:02 momjian Exp $
+#
+#-------------------------------------------------------------------------
+
+TARGET = pginsert pgwordcount pgnulltest
+LDFLAGS = -lpgeasy
+
+all : $(TARGET)
+
+pginsert:
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+pgwordcount:
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+pgnulltest:
+       gcc -o $@ $(CFLAGS) $@.c $(PGEASY) $(LDFLAGS)
+
+clean:
+       rm -f *.o $(TARGET) log core
+
similarity index 98%
rename from contrib/pginterface/pginsert.c
rename to src/interfaces/pgeasy/examples/pginsert.c
index ad0811c88a6e9cc45193bc5085b4076f6338641b..7cb2cf5b2683b27ea7b944e2ace3b8119bfff30c 100644 (file)
@@ -7,7 +7,7 @@
 #include <time.h>
 #include <libpq-fe.h>
 #include "halt.h"
-#include "pginterface.h"
+#include "pgeasy.h"
 
 int
 main(int argc, char **argv)
similarity index 99%
rename from contrib/pginterface/pgnulltest.c
rename to src/interfaces/pgeasy/examples/pgnulltest.c
index bb02fa628e1aece889e09c898dea8f770472dd4f..4651d77bac84ae023e460d2052d9b18b09c9dac4 100644 (file)
@@ -9,7 +9,7 @@
 #include <time.h>
 #include <halt.h>
 #include <libpq-fe.h>
-#include <pginterface.h>
+#include <pgeasy.h>
 
 int
 main(int argc, char **argv)
similarity index 97%
rename from contrib/pginterface/pgwordcount.c
rename to src/interfaces/pgeasy/examples/pgwordcount.c
index 4fe23187f026735954466db6830847d3d78e879c..4715f88f43899e5db833e0bef9672816d99f7e97 100644 (file)
@@ -6,7 +6,7 @@
 #include <stdio.h>
 #include "halt.h"
 #include <libpq-fe.h>
-#include "pginterface.h"
+#include "pgeasy.h"
 
 int
 main(int argc, char **argv)
similarity index 87%
rename from contrib/pginterface/pginterface.3
rename to src/interfaces/pgeasy/pgeasy.3
index 22dfb5d55953890078065faf143e13a66128543e..a24bc041105c8606fa48e560e8e9eee8f9b70ba4 100644 (file)
@@ -1,9 +1,9 @@
 .\" This is -*-nroff-*-
 .\" XXX standard disclaimer belongs here....
-.\" $Header: /cvsroot/pgsql/contrib/pginterface/Attic/pginterface.3,v 1.1 1998/09/11 05:14:08 momjian Exp $
-.TH PGINTERFACE INTRO 08/08/98 PostgreSQL PostgreSQL
+.\" $Header: /cvsroot/pgsql/src/interfaces/pgeasy/Attic/pgeasy.3,v 1.1 1999/10/11 17:47:01 momjian Exp $
+.TH PGEASY INTRO 08/08/98 PostgreSQL PostgreSQL
 .SH DESCRIPTION
-Pginterface allows you to cleanly interface to the libpq library,
+Pgeasy allows you to cleanly interface to the libpq library,
 more like a 4gl SQL interface.
 .PP
 It consists of set of simplified C functions that encapsulate the
@@ -46,7 +46,7 @@ queries,
 allows you to pass pointers as parameters, and on return the variables
 are filled with data from the binary cursor you opened.  These binary
 cursors can not be used if you are running the
-.BR pginterface
+.BR pgeasy
 client on a system with a different architecture than the database
 server.  If you pass a NULL pointer parameter, the column is skipped.
 .BR fetchwithnulls
@@ -67,5 +67,5 @@ and
 allow you to handle multiple result sets at the same time.
 .PP
 There are a variety of demonstration programs in the
-.BR pginterface
+.BR pgeasy
 source directory.
similarity index 99%
rename from contrib/pginterface/pginterface.c
rename to src/interfaces/pgeasy/pgeasy.c
index 1da61aae4933c963633ed23be11a663352cbbc9b..f3d6aae01e6d7ba8acfac4ed4dcff623b82b6671 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * pginterface.c
+ * pgeasy.c
  *
 */
 
@@ -9,7 +9,7 @@
 
 #include <libpq-fe.h>
 #include "halt.h"
-#include "pginterface.h"
+#include "pgeasy.h"
 
 #define NUL '\0'