Re: Add more sanity checks around callers of changeDependencyFor()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add more sanity checks around callers of changeDependencyFor()
Дата
Msg-id 2093294.1689001488@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add more sanity checks around callers of changeDependencyFor()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Add more sanity checks around callers of changeDependencyFor()
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-Jul-10, Tom Lane wrote:
>> The user has altered properties of an extension member
>> object locally within the database, but has not changed the extension's
>> installation script to match.

> If I were developing an extension and decided, down the line, to have
> some objects in another schema, I would certainly increment the
> extension's version number and have a new script to move the object.  I
> would never expect the user to do an ALTER directly (and it makes no
> sense for me as an extension developer to do it manually, either.)

It's certainly poor practice, but I could see doing it early in an
extension's development (while you're still working towards 1.0).

ISTR that we discussed forbidding such changes way back when the
extension mechanism was invented, and decided against it on the
grounds that (a) it'd be nanny-ism, (b) we'd have to add checks in an
awful lot of places and it'd be easy to miss some, and (c) forbidding
superusers from doing anything they want is generally not our style.
We could reconsider that now, but I think we'd probably land on the
same place.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Add more sanity checks around callers of changeDependencyFor()
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: Exclusion constraints on partitioned tables