Re: Safety/validity of resetting permissions by updating system tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Safety/validity of resetting permissions by updating system tables
Date
Msg-id 2525549.1609519448@sss.pgh.pa.us
Whole thread Raw
In response to Safety/validity of resetting permissions by updating system tables  (Isaac Morland <isaac.morland@gmail.com>)
Responses Re: Safety/validity of resetting permissions by updating system tables
Re: Safety/validity of resetting permissions by updating system tables
List pgsql-hackers
Isaac Morland <isaac.morland@gmail.com> writes:
> Is it safe and valid to reset to default permissions by doing
> UPDATE pg_namespace/pg_class/pg_type/pg_proc
> SET nspacl/relacl/typacl/proacl = NULL WHERE ... to accomplish this?

Not terribly; the main objection is you'd fail to update pg_shdepend.

> And what do people think, conceptually, of the notion of adding a command
> to do this without resorting to updating system tables directly?

I'm a little skeptical as to the use-case, particularly once you take
ALTER DEFAULT PRIVILEGES into account and try to figure out what that
means.  If it means "apply the current default privileges", you could
easily be "resetting" to a state that never actually prevailed in the
past.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Zhihong Yu
Date:
Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Next
From: Zhihong Yu
Date:
Subject: Re: poc - possibility to write window function in PL languages