From 24d1280c4d75038f130495a25844c60d6810faab Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 11 Feb 2011 22:53:43 -0500 Subject: Clean up installation directory choices for extensions. Arrange for the control files to be in $SHAREDIR/extension not $SHAREDIR/contrib, since we're generally trying to deprecate the term "contrib" and this is a once-in-many-moons opportunity to get rid of it in install paths. Fix PGXS to install the $EXTENSION file into that directory no matter what MODULEDIR is set to; a nondefault MODULEDIR should only affect the script and secondary extension files. Fix the control file directory parameter to be interpreted relative to $SHAREDIR, to avoid a surprising disconnect between how you specify that and what you set MODULEDIR to. Per discussion with David Wheeler. --- doc/src/sgml/extend.sgml | 27 ++++++++++++++++----------- doc/src/sgml/ref/create_extension.sgml | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 93bcba9a10c..90248e59e78 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -365,13 +365,13 @@ The command relies on a control file for each extension, which must be named the same as the extension with a suffix of .control, and must be placed in the - installation's SHAREDIR/contrib directory. There + installation's SHAREDIR/extension directory. There must also be at least one SQL script file, which follows the naming pattern extension-version.sql (for example, foo-1.0.sql for version 1.0 of extension foo). By default, the script file(s) are also - placed in the SHAREDIR/contrib directory; but the + placed in the SHAREDIR/extension directory; but the control file can specify a different directory for the script file(s). @@ -395,7 +395,9 @@ The directory containing the extension's SQL script file(s). Unless an absolute path is given, the name is relative to - the SHAREDIR/contrib directory. + the installation's SHAREDIR directory. The + default behavior is equivalent to specifying + directory = 'extension'. @@ -905,23 +907,26 @@ include $(PGXS) - MODULEDIR + EXTENSION - subdirectory into which EXTENSION, DATA and DOCS files should be - installed (if not set, default is contrib) + extension name(s); for each name you must provide an + extension.control file, + which will be installed into + prefix/share/extension - EXTENSION + MODULEDIR - extension name(s); for each name you must provide an - extension.control file, - which will be installed into - prefix/share/$MODULEDIR + subdirectory of prefix/share + into which DATA and DOCS files should be installed + (if not set, default is extension if + EXTENSION is set, + or contrib if not) diff --git a/doc/src/sgml/ref/create_extension.sgml b/doc/src/sgml/ref/create_extension.sgml index 9e0e3c440b6..d3b5fb009b3 100644 --- a/doc/src/sgml/ref/create_extension.sgml +++ b/doc/src/sgml/ref/create_extension.sgml @@ -67,7 +67,7 @@ CREATE EXTENSION extension_name The name of the extension to be installed. PostgreSQL will create the extension using details from the file - SHAREDIR/contrib/extension.control. + SHAREDIR/extension/extension_name.control. -- cgit v1.2.3