Re: pgxs: build infrastructure for extensions v1 - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: pgxs: build infrastructure for extensions v1 |
Date | |
Msg-id | 200406071342.i57DgRK25207@candle.pha.pa.us Whole thread Raw |
In response to | pgxs: build infrastructure for extensions v1 (Fabien COELHO <coelho@cri.ensmp.fr>) |
Responses |
Re: pgxs: build infrastructure for extensions v1
|
List | pgsql-patches |
Have folks looked this over? Is this the direction we want to go? --------------------------------------------------------------------------- Fabien COELHO wrote: > > Dear patchers, > > > Please find attached a patch which provides a working infrastructure for > pg extensions such as new gist-based indexes, functions, types... > > The infrastructure is a simple reworking of the already available internal > infrastructure for contrib, so that it can be used outside of the > postgresql source tree after installation, without gory details being in > sight of the user... > > As a test case and show how, I provided new Makefile.pgxs for most contrib > subdirectories. After postgresql has been configure, compiled and > installed, simply try them with: > > "cd contrib/foo ; make -f Makefile.pgxs install" > > > BEWARE: The patch does not include an update of "configure", as I do not > have the same version of "autoconf". So configure must be regenerated: > "autoconf configure.in > configure" > > There is an initial documentation in "pgxs.sgml". > > > How it works: > > - necessary files (includes, scripts, makefiles...) are copied in lib/build > on the initial "make install". The adds 2MB of stuff. The former > installation can be obtained with "make light-install", but then > no extensions could be added to the installation, so this is more for > packagers that would like to provide a separate -dev package, IMHO. > > Due to gnu-make restriction on how its includes work, these files must > be copied with the same directory structure as the pg source tree. > The fact does not appear at all in the actual infrastructure from the > user point of view, but it explains why subdirectories are necessary > under the build subdir... > > - the makefile of any extension is expected to set macro PGXS to > "pg_config --pgxs", to include a special pgxs.mk makefile, and to > set some macros depending on what is to be built, just like in > current contrib. See the examples under contrib. > > - I've added two PGXS-triggered conditionnals in Makefile.global, > so that includes and libraries are taken where needed... > > > It works for me. > > > Questions and thoughts: > > - maybe more files should be copied? if so, which ones? > > - should this actually replace the current "contrib" infrastructure? > > I would tend to say "yes"... that would require to replace all makefiles > there by the Makefile.pgxs version, to remove "contrib-global.mk", and > also possibly to update some documentations. > > - more documentation? > integration of the documentation wrt pg doc? > > - validation? one could thing of installing some contribs > when "make check" is performed, so as to validate that the > extension infrastructure is not broken? > > > Have a nice day, > > > -- > Fabien Coelho - coelho@cri.ensmp.fr Content-Description: [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
pgsql-patches by date: