Re: Restoring default privileges on objects

2023-08-30 Thread Peter J. Holzer
On 2023-08-29 14:44:48 -0600, Stuart McGraw wrote: > On 8/29/23 13:27, Tom Lane wrote: > > Fixing \dp to honor "\pset null" for this might be a reasonable > > thing to do too. I'm actually a bit surprised that that doesn't > > work already. > > That change would still require someone using \dp to

Re: Restoring default privileges on objects

2023-08-29 Thread Erik Wienhold
> On 29/08/2023 22:44 CEST Stuart McGraw wrote: > > That change would still require someone using \dp to realize that > the "Access privileges" value could be either '' or NULL (I guess > that could be pointed out more obviously in the psql doc), and then > do a '\pset null' before doing \dp? Tha

Re: Restoring default privileges on objects

2023-08-29 Thread Stuart McGraw
On 8/29/23 13:27, Tom Lane wrote: Erik Wienhold writes: On 29/08/2023 18:43 CEST Stuart McGraw wrote: Shouldn't psql put *something* (like "(default)" or "-") in the "Access privileges" column to indicate that? Or conversely, something (like "(none)"?) in the revoked case? Indeed, that's

Re: Restoring default privileges on objects

2023-08-29 Thread Erik Wienhold
> On 29/08/2023 21:27 CEST Tom Lane wrote: > > Yeah, perhaps. The reason it so seldom comes up is that a state of > zero privileges is extremely rare (because it's useless in practice). > > That being the case, if we were to do something about this, I'd vote > for changing the display of zero-pri

Re: Restoring default privileges on objects

2023-08-29 Thread Tom Lane
Erik Wienhold writes: > On 29/08/2023 18:43 CEST Stuart McGraw wrote: >> Shouldn't psql put *something* (like "(default)" or "-") in the >> "Access privileges" column to indicate that? Or conversely, >> something (like "(none)"?) in the revoked case? > Indeed, that's confusing. Command \dp alw

Re: Restoring default privileges on objects

2023-08-29 Thread Erik Wienhold
> On 29/08/2023 18:43 CEST Stuart McGraw wrote: > > How does one distinguish between (blank)=(default privileges) > and (blank)=(no privileges)? > > Shouldn't psql put *something* (like "(default)" or "-") in the > "Access privileges" column to indicate that? Or conversely, > something (like "(no

Re: Restoring default privileges on objects

2023-08-29 Thread Stuart McGraw
On 8/29/23 08:14, Tom Lane wrote: Erik Wienhold writes: On 29/08/2023 03:23 CEST Stuart McGraw wrote: If I've done a GRANT or REVOKE on some of the tables, how do I restore the default privileges so that the “Access privileges” appears empty again? I re-granted what I think are the default p

Re: Restoring default privileges on objects

2023-08-29 Thread Tom Lane
Erik Wienhold writes: > On 29/08/2023 03:23 CEST Stuart McGraw wrote: >> If I've done a GRANT or REVOKE on some of the tables, how do I restore >> the default privileges so that the “Access privileges” appears empty >> again? I re-granted what I think are the default privileges but the >> "Acces

Re: Restoring default privileges on objects

2023-08-29 Thread Erik Wienhold
> On 29/08/2023 03:23 CEST Stuart McGraw wrote: > > If I've done a GRANT or REVOKE on some of the tables, how do I restore > the default privileges so that the “Access privileges” appears empty > again? I re-granted what I think are the default privileges but the > "Access privileges" column for

Restoring default privileges on objects

2023-08-29 Thread Stuart McGraw
Hello, The Postgresql docs on object privileges, https://www.postgresql.org/docs/14/ddl-priv.html say this in regard to the output of the psql \dp command: | If the “Access privileges” column is empty for a given object, it | means the object has default privileges (that is, its privileges