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
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
+++ /dev/null
-#
-# 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
-
+++ /dev/null
-
-
- 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)
interfaces/libpq/Makefile
interfaces/ecpg/lib/Makefile
interfaces/libpq++/Makefile
+ interfaces/libpgeasy/Makefile
interfaces/libpgtcl/Makefile
interfaces/odbc/GNUmakefile
interfaces/odbc/Makefile.global
#
#
# 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 $
#
#-------------------------------------------------------------------------
ifeq ($(USE_ODBC), true)
$(MAKE) -C odbc $@
endif
+ $(MAKE) -C pgeasy$@
perl5/Makefile: perl5/Makefile.PL
cd perl5 && $(PERL) Makefile.PL
# 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 $
#
#-------------------------------------------------------------------------
.PHONY: clean
clean: clean-shlib
- rm -f $(OBJS) lib$(NAME).a
+ rm -f lib$(NAME).a $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
# 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 $
#
#-------------------------------------------------------------------------
.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
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# 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
+
--- /dev/null
+
+
+ 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)
--- /dev/null
+#-------------------------------------------------------------------------
+#
+# 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
+
#include <time.h>
#include <libpq-fe.h>
#include "halt.h"
-#include "pginterface.h"
+#include "pgeasy.h"
int
main(int argc, char **argv)
#include <time.h>
#include <halt.h>
#include <libpq-fe.h>
-#include <pginterface.h>
+#include <pgeasy.h>
int
main(int argc, char **argv)
#include <stdio.h>
#include "halt.h"
#include <libpq-fe.h>
-#include "pginterface.h"
+#include "pgeasy.h"
int
main(int argc, char **argv)
.\" 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
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
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.
/*
- * pginterface.c
+ * pgeasy.c
*
*/
#include <libpq-fe.h>
#include "halt.h"
-#include "pginterface.h"
+#include "pgeasy.h"
#define NUL '\0'