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

From Michael Paquier
Subject Re: Add more sanity checks around callers of changeDependencyFor()
Date
Msg-id ZKyzFVXVW9L6AOFY@paquier.xyz
Whole thread Raw
In response to Re: Add more sanity checks around callers of changeDependencyFor()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Jul 10, 2023 at 11:04:48AM -0400, Tom Lane wrote:
> 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,

The namepace modifications depending on the object types are quite
centralized lately, FWIW.  And that was the case in 9.3 as well since
we have ExecAlterObjectSchemaStmt().  It would be easy to miss a new
code path if somebody introduces a new object type that needs its own
update path, but based on the last 15 years of experience on the
matter, that would be unlikely?  Adding a note at the top of
ExecAlterObjectSchemaStmt() would make that even harder to miss.

> and (c) forbidding
> superusers from doing anything they want is generally not our style.

Yeah.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Add hint message for check_log_destination()
Next
From: Justin Pryzby
Date:
Subject: pg16b2: REINDEX segv on null pointer in RemoveFromWaitQueue