Re: [INTERNET] Re: auto vacuum question

2023-08-29 Thread Jerry Sievers
Alan Stange writes: > On 8/28/23 18:35, Jerry Sievers wrote: > >> Adrian Klaver writes: >> >>> On 8/28/23 13:06, Alan Stange wrote: >>> All, We recently changed the name of the superuser role in our database, >> My take on this, is that the *postmaster* user is perhaps the one that >>

Re: createuser unexpectedly creates superuser with createdb and createrole

2023-08-29 Thread Laurenz Albe
On Wed, 2023-08-30 at 02:44 +0200, Erik Wienhold wrote: > I recently created a superuser with createuser on 15.4 and was surprised that > the superuser also has the CREATEDB and CREATEROLE attribute (although > redundant > for a superuser).  The docs [1] even say that --no-createdb and > --no-cre

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

createuser unexpectedly creates superuser with createdb and createrole

2023-08-29 Thread Erik Wienhold
I recently created a superuser with createuser on 15.4 and was surprised that the superuser also has the CREATEDB and CREATEROLE attribute (although redundant for a superuser). The docs [1] even say that --no-createdb and --no-createrole are the defaults. Those options don't even have an effect w

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: [INTERNET] Re: auto vacuum question

2023-08-29 Thread Alan Stange
On 8/28/23 18:35, Jerry Sievers wrote: > Adrian Klaver writes: > >> On 8/28/23 13:06, Alan Stange wrote: >> >>> All, >>> We recently changed the name of the superuser role in our database, > My take on this, is that the *postmaster* user is perhaps the one that > the OP cut privileges on, and thus

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

Re: PL/Perl function signatures

2023-08-29 Thread Luca Ferrari
On Mon, Aug 28, 2023 at 9:53 AM Luca Ferrari wrote: > > testdb=# create or replace function f( a int ) > returns text > as $$ > use feature 'signatures'; shame on me! Clearly this cannot work because at the 'use' stage the function is already running, so the signatures feature is evaluated in the

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