Re: Extension security improvement: Add support for extensions with an owned schema - Mailing list pgsql-hackers

From Sadeq Dousti
Subject Re: Extension security improvement: Add support for extensions with an owned schema
Date
Msg-id CADE6Lvh9hBvLJm_X73w+=bo3B9EH9gzM=cGx1AFOsmCEP4Vm5Q@mail.gmail.com
Whole thread Raw
In response to Re: Extension security improvement: Add support for extensions with an owned schema  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
You're absolutely right about the lack of interactivity. I'd still go with your suggestion of using something along the lines of cascade/force, as dropping the schema silently can potentially delete the user data. 

Bests, 
Sadeq 

On Mon, Jul 28, 2025, 02:27 David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sunday, July 27, 2025, Sadeq Dousti <msdousti@gmail.com> wrote:

(a) The patch affects DROP EXTENSION in that it drops the schema as well, if it's owned by the extension. This needs to be mentioned in the documentation. In addition, an extra confirmation (e.g., "This will drop schema nnnn as well, do you wish to continue?") when dropping the extension might be desired, as the extension schema could contain user data (e.g., pg_cron keeps the jobs and their execution details).

SQL isn’t interactive in this sense.  There isn’t a way to ask “are you sure?”.  At best the server can refuse to do something unless additional options, like “force/cascade” are present in the command.

David J.
 

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Extension security improvement: Add support for extensions with an owned schema
Next
From: Peter Smith
Date:
Subject: Re: DOCS: What SGML markup to use for user objects like tables, columns, etc?