+26/10/2009 CΓ©dric Villemain <cedric.villemain@dalibo.com>
+
+ * 0.3.1 - fix Makefile without PGXS
+ - fix install doc in README
+
12/08/2009 CΓ©dric Villemain <cedric.villemain@dalibo.com>
* 0.3 - pgfincore now return a set of record
DATA_built = pgfincore.sql uninstall_pgfincore.sql
DOCS = README.pgfincore
-PGXS := $(shell pg_config --pgxs)
+ifdef USE_PGXS
+PG_CONFIG = pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
+else
+subdir = contrib/pgfincore
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
-Version :
-v0.3
-
Install:
-./configure && make clean && make && sudo make install
+export USE_PGXS=1 ; make clean ; make && sudo make install
Create the functions from the sql script (it should be in your contrib directory)
-
+psql mydb -f pgfincore.sql
+
Debug:
set client_min_messages TO debug5;
test | base/16987/26245 | 262144 | 426 | 1
test | base/16987/26245.1 | 8090 | 0 | 0
+Or more fun :
+
+cedric=# with recursive pgclass (reloid,reltoastrelid) as (
+ select oid, reltoastrelid from pg_class where relname ='largetable'
+union all
+ select t.oid,t.reltoastrelid from pgclass p, pg_class t
+ where p.reltoastrelid = t.oid
+) select pgfincore(pgclass.reloid) from pgclass;
+ pgfincore
+-----------------------------------------
+ (largetable,base/16987/83603,2,0,0)
+ (pg_toast_83603,base/16987/83606,0,0,0)
+
+
+
Enjoy ;)
+
+