pgsql: Refactor ALTER EXTENSION UPDATE to have cleaner multi-step seman

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Refactor ALTER EXTENSION UPDATE to have cleaner multi-step seman
Дата
Msg-id E1PoNDj-0003JD-RN@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Refactor ALTER EXTENSION UPDATE to have cleaner multi-step semantics.

This change causes a multi-step update sequence to behave exactly as if the
updates had been commanded one at a time, including updating the "requires"
dependencies afresh at each step.  The initial implementation took the
shortcut of examining only the final target version's "requires" and
changing the catalog entry but once.  But on reflection that's a bad idea,
since it could lead to executing old update scripts under conditions
different than they were designed/tested for.  Better to expend a few extra
cycles and avoid any surprises.

In the same spirit, if a CREATE EXTENSION FROM operation involves applying
a series of update files, it will act as though the CREATE had first been
done using the initial script's target version and then the additional
scripts were invoked with ALTER EXTENSION UPDATE.

I also removed the restriction about not changing encoding in secondary
control files.  The new rule is that a script is assumed to be in whatever
encoding the control file(s) specify for its target version.  Since this
reimplementation causes us to read each intermediate version's control
file, there's no longer any uncertainty about which encoding setting would
get applied.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6c2e734f0a07e57c2837543416f5987ec91d0839

Modified Files
--------------
doc/src/sgml/extend.sgml         |   14 +-
src/backend/commands/extension.c |  382 ++++++++++++++++++++++++--------------
2 files changed, 252 insertions(+), 144 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Properly handle Win32 paths of 'E:abc', which can be either abso