Re: Fixing busted citext function declarations

Поиск
Список
Период
Сортировка
Искать
От
David E. Wheeler
Тема
Re: Fixing busted citext function declarations
Дата
в 17:18:07
Msg-id
F3585591-E0F8-4E46-A51A-28488B9B8F05@justatheory.com
Ответ на
Список
Дерево обсуждения
Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Fixing busted citext function declarations Bruce Momjian <bruce@momjian.us>
Re: Fixing busted citext function declarations Bruce Momjian <bruce@momjian.us>
Re: Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations "David G. Johnston" <david.g.johnston@gmail.com>
Re: Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations "David G. Johnston" <david.g.johnston@gmail.com>
Re: Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations "David E. Wheeler" <david@justatheory.com>
Re: Fixing busted citext function declarations "David E. Wheeler" <david@justatheory.com>
Re: Fixing busted citext function declarations Tom Lane <tgl@sss.pgh.pa.us>
Re: Fixing busted citext function declarations "David E. Wheeler" <david@justatheory.com>
On May 5, 2015, at 10:07 AM, Alvaro Herrera  wrote:

>> So AFAICS we need to actually drop and recreate
>> the citext regexp_matches() functions in the upgrade script.  That means
>> "ALTER EXTENSION citext UPDATE" will fail if these functions are being
>> used in any views.  That's annoying but I see no way around it.  (We
>> could have the upgrade script do DROP CASCADE, but that seems way too
>> destructive.)
> 
> I think we do need to have the upgrade script drop/recreate without
> cascade.  Then, users can "alter extension upgrade", note the
> problematic views (which should be part of the error message), drop
> them, then retry the extension update and re-create their views.  This
> is necessarily a manual procedure -- I don't think we can re-create
> views using the function automatically.  CASCADE seems pretty dangerous.

FWIW, this is a challenge inherent in all extension upgrade scripts. It’d be great if there was a way to defer such dependency errors to COMMIT time, so if a function is replaced with a new one that’s compatible with the old, the dependency tree could be updated automatically.

Best,

David

В списке pgsql-hackers по дате отправления
От: Alvaro Herrera
Дата:
От: Tom Lane
Дата:
FAQ