postgres/src
Tom Lane 40b449ae84 Allow CREATE EXTENSION to follow extension update paths.
Previously, to update an extension you had to produce both a version-update
script and a new base installation script.  It's become more and more
obvious that that's tedious, duplicative, and error-prone.  This patch
attempts to improve matters by allowing the new base installation script
to be omitted.  CREATE EXTENSION will install a requested version if it
can find a base script and a chain of update scripts that will get there.
As in the existing update logic, shorter chains are preferred if there's
more than one possibility, with an arbitrary tie-break rule for chains
of equal length.

Also adjust the pg_available_extension_versions view to show such versions
as installable.

While at it, refactor the code so that CASCADE processing works for
extensions requested during ApplyExtensionUpdates().  Without this,
addition of a new requirement in an updated extension would require
creating a new base script, even if there was no other reason to do that.
(It would be easy at this point to add a CASCADE option to ALTER EXTENSION
UPDATE, to allow the same thing to happen during a manually-commanded
version update, but I have not done that here.)

Tom Lane, reviewed by Andres Freund

Discussion: <20160905005919.jz2m2yh3und2dsuy@alap3.anarazel.de>
2016-09-11 14:15:07 -04:00
..
backend Allow CREATE EXTENSION to follow extension update paths. 2016-09-11 14:15:07 -04:00
bin Allow pg_dump to dump non-extension members of an extension-owned schema. 2016-09-08 13:12:01 -04:00
common Move code shared between libpq and backend from backend/libpq/ to common/. 2016-09-02 13:49:59 +03:00
fe_utils Teach appendShellString() to not quote strings containing "-". 2016-09-06 14:53:31 -04:00
include Improve unreachability recognition in elog() macro. 2016-09-10 17:54:23 -04:00
interfaces Move code shared between libpq and backend from backend/libpq/ to common/. 2016-09-02 13:49:59 +03:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Make better use of existing enums in plpgsql 2016-09-09 12:00:00 -04:00
port Simplify correct use of simple_prompt(). 2016-08-30 17:02:02 -04:00
template
test Fix locking a tuple updated by an aborted (sub)transaction 2016-09-09 15:54:29 -03:00
timezone Add regression test coverage for non-default timezone abbreviation sets. 2016-09-04 20:02:16 -04:00
tools Fix and simplify MSVC build's handling of xml/xslt/uuid dependencies. 2016-09-11 12:46:55 -04:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore
bcc32.mak
DEVELOPERS
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Provide and use a makefile target to build all generated headers. 2016-07-01 15:09:02 -04:00
Makefile.shlib Make the AIX case of Makefile.shlib safe for parallel make. 2016-07-23 20:30:03 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak