# 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.)
# 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