From: mj Date: Fri, 19 Apr 2002 16:55:36 +0000 (+0000) Subject: Changed some stuff to match PostgreSQL 7.2 X-Git-Tag: prexmlproducerconfig~102 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=20fc136a7d185321e0d999becaca2904067aee7e;p=mir.git Changed some stuff to match PostgreSQL 7.2 --- diff --git a/dbscripts/dupetrigger/INSTALL b/dbscripts/dupetrigger/INSTALL index 47e781b1..e07b3e91 100755 --- a/dbscripts/dupetrigger/INSTALL +++ b/dbscripts/dupetrigger/INSTALL @@ -44,5 +44,5 @@ To install the trigger do the following: # edit postgresql.script (And change the path to dupetrigger.so to INSTALLDIR) -# psql -U postgres Mir < postgresql.script +# psql -Upostgres -f postgresql.script Mir (This installs the the trigger binary and creates a new trigger.) diff --git a/dbscripts/dupetrigger/Makefile-dist b/dbscripts/dupetrigger/Makefile-dist index d4d0f605..9a0df1b6 100755 --- a/dbscripts/dupetrigger/Makefile-dist +++ b/dbscripts/dupetrigger/Makefile-dist @@ -1,22 +1,25 @@ # Makefile -CC=gcc -PGINC=/usr/include/postgresql -PGVERSION=-DPG70 -#PGVERSION=-DPG71 -CFLAGS=-I$(PGINC) $(PGVERSION) +# Set the following directory so that it contains spi.h and trigger.h +PGINC=/usr/include/postgresql/server + +#PGVERSION=-DPG70 +PGVERSION=-DPG71 # If changed, also change postgresql.script -INSTALLDIR=. #./../../Mir/src +INSTALLDIR=/var/lib/postgres/data + +CC=gcc +CFLAGS=-I$(PGINC) $(PGVERSION) + install: dupetrigger.so cp dupetrigger.so $(INSTALLDIR) chmod 644 $(INSTALLDIR)/dupetrigger.so # # Now, change the path to dupetrigger.so in postgresql.script to the - # absolute path where dupetrigger.so is installed (this - # is typically ../../../Mir/src) + # absolute path where dupetrigger.so is installed (${INSTALLDIR}) dupetrigger.so: dupetrigger.o $(CC) -shared -dynamic -o dupetrigger.so dupetrigger.o diff --git a/dbscripts/dupetrigger/postgresql.sript b/dbscripts/dupetrigger/postgresql.sript index 298ac42d..9e526fc8 100755 --- a/dbscripts/dupetrigger/postgresql.sript +++ b/dbscripts/dupetrigger/postgresql.sript @@ -1,4 +1,3 @@ -\connect - postgres DROP TRIGGER commdupetrigger ON comment; DROP TRIGGER contentdupetrigger ON content; DROP FUNCTION dupecheck();