From 20fc136a7d185321e0d999becaca2904067aee7e Mon Sep 17 00:00:00 2001 From: mj Date: Fri, 19 Apr 2002 16:55:36 +0000 Subject: [PATCH] Changed some stuff to match PostgreSQL 7.2 --- dbscripts/dupetrigger/INSTALL | 2 +- dbscripts/dupetrigger/Makefile-dist | 19 +++++++++++-------- dbscripts/dupetrigger/postgresql.sript | 1 - 3 files changed, 12 insertions(+), 10 deletions(-) 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(); -- 2.11.0