Dear hackers,
after some comments and discussions, here is a proof-of-concept
demonstration of a postgresql extension infrastructure.
(1) apply the patch...
(2) ********** REGENERATE CONFIGURE ************
sh> autoconf configure.in > configure sh> chmod +x configure
(3) configure, compile, install and use postgresql:
sh> configure --prefix=/tmp/pg sh> make sh> make install
where is our postgresql installation... sh> PATH=/tmp/pg/bin:$PATH
(5) build an extension with the new infrastructure, for instance with some contrib that define a new type.
sh> cd contrib/isbn_issn sh> mv Makefile Makefile.old
now create an appropriate extension Makefile (well, this should have been done by the person who provides the
extension)
sh> cat > Makefile
PGXSDIR := $(shell pg_config --pgxsdir)
include $(PGXSDIR)/pgxs_begin.mk
MODULES = isbn_issn
DATA_built = isbn_issn.sql
DOCS = README.isbn_issn
include $(PGXSDIR)/pgxs_end.mk
(6) now enjoy: sh> make sh> make install sh> make clean sh> make uninstall
There is a sample extension makefile in $(pg_config --pgxsdir)/Makefile.pgxs
No real documentation yet, maybe hidden bugs...
Thanks in advance for your comments.
--
Fabien Coelho - coelho@cri.ensmp.fr