1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Core support for "extensions", which are packages of SQL objects.

This patch adds the server infrastructure to support extensions.
There is still one significant loose end, namely how to make it play nice
with pg_upgrade, so I am not yet committing the changes that would make
all the contrib modules depend on this feature.

In passing, fix a disturbingly large amount of breakage in
AlterObjectNamespace() and callers.

Dimitri Fontaine, reviewed by Anssi Kääriäinen,
Itagaki Takahiro, Tom Lane, and numerous others
This commit is contained in:
Tom Lane
2011-02-08 16:08:41 -05:00
parent 414c5a2ea6
commit d9572c4e3b
69 changed files with 4206 additions and 547 deletions

View File

@ -17,16 +17,17 @@
#
# Set one of these three variables to specify what is built:
#
# MODULES -- list of shared objects to be built from source files with
# same stem (do not include suffix in this list)
# MODULE_big -- a shared object to build from multiple source files
# MODULES -- list of shared-library objects to be built from source files
# with same stem (do not include library suffixes in this list)
# MODULE_big -- a shared library to build from multiple source files
# (list object files in OBJS)
# PROGRAM -- a binary program to build (list object files in OBJS)
# PROGRAM -- an executable program to build (list object files in OBJS)
#
# The following variables can also be set:
#
# MODULEDIR -- subdirectory into which DATA and DOCS files should be
# installed (if not set, default is "contrib")
# MODULEDIR -- subdirectory into which EXTENSION, DATA and DOCS files
# should be installed (if not set, default is "contrib")
# EXTENSION -- name of extension (there must be a $EXTENSION.control file)
# DATA -- random files to install into $PREFIX/share/$MODULEDIR
# DATA_built -- random files to install into $PREFIX/share/$MODULEDIR,
# which need to be built first
@ -82,7 +83,7 @@ ifdef PG_CPPFLAGS
override CPPFLAGS := $(PG_CPPFLAGS) $(CPPFLAGS)
endif
all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULES))
all: $(PROGRAM) $(DATA_built) $(SCRIPTS_built) $(addsuffix $(DLSUFFIX), $(MODULES)) $(addsuffix .control, $(EXTENSION))
ifdef MODULE_big
# shared library parameters
@ -95,8 +96,8 @@ endif # MODULE_big
install: all installdirs
ifneq (,$(DATA)$(DATA_built))
@for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built); do \
ifneq (,$(DATA)$(DATA_built)$(EXTENSION))
@for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built) $(addsuffix .control, $(EXTENSION)); do \
echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'"; \
$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'; \
done
@ -167,8 +168,8 @@ endif # MODULE_big
uninstall:
ifneq (,$(DATA)$(DATA_built))
rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(DATA) $(DATA_built)))
ifneq (,$(DATA)$(DATA_built)$(EXTENSION))
rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(DATA) $(DATA_built) $(addsuffix .control, $(EXTENSION))))
endif
ifneq (,$(DATA_TSEARCH))
rm -f $(addprefix '$(DESTDIR)$(datadir)/tsearch_data'/, $(notdir $(DATA_TSEARCH)))