Re: Add more sanity checks around callers of changeDependencyFor() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add more sanity checks around callers of changeDependencyFor()
Date
Msg-id 2093294.1689001488@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add more sanity checks around callers of changeDependencyFor()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Add more sanity checks around callers of changeDependencyFor()
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Add more sanity checks around callers of changeDependencyFor()
Next
From: Paul A Jungwirth
Date:
Subject: Re: Exclusion constraints on partitioned tables