Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 7:23 AM Laurenz Albe wrote: > On Wed, 2024-01-24 at 11:08 +0100, gp...@free.fr wrote: > > for this "ALTER DATABASE" form, it should be mentioned that after > execution of the command, > > the old database owner loses all his privileges on it (even connection) > although it

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
David, reading again your last reply, it reminded me that as soon as we create a database we revoke default PUBLIC grants (i.e revoke all on from public) to grant only databases privileges to specific roles/users. That's why after changing database ownership, we have to (re)grant privileges

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 10:13 AM Tom Lane wrote: > "David G. Johnston" writes: > > postgres=# grant all on database newdb2 to testowner; > > -- as I am logged in as davidj this grant should actually happen, with > > davidj as the grantor > > -- the grants that materialize from ownership has the

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Tom Lane
"David G. Johnston" writes: > postgres=# grant all on database newdb2 to testowner; > -- as I am logged in as davidj this grant should actually happen, with > davidj as the grantor > -- the grants that materialize from ownership has the owning role as the > grantor Yes. The FM points out somewhe

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
De: "David G. Johnston" À: "gparc" Cc: "Laurenz Albe" , "Daniel Gustafsson" , "pgsql-docs" Envoyé: Mercredi 24 Janvier 2024 17:50:17 Objet: Re: SQL command : ALTER DATABASE OWNER TO On Wed, Jan 24, 2024 at 9:23 AM < [ mailto:gp...@free.fr | gp...@free.fr ] > wrote: - [postgres] $ psq

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Tom Lane
"David G. Johnston" writes: > On Wed, Jan 24, 2024 at 8:35 AM Laurenz Albe > wrote: >> The permissions are transferred to the new owner, so the old owner doesn't >> have any privileges on the object (and, in your case, cannot connect to >> the database any more). > I dislike this change, ownersh

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 9:56 AM Alvaro Herrera wrote: > On 2024-Jan-24, Laurenz Albe wrote: > > > The permissions are transferred to the new owner, so the old owner > doesn't > > have any privileges on the object (and, in your case, cannot connect to > > the database any more). > > However, if th

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Alvaro Herrera
On 2024-Jan-24, Laurenz Albe wrote: > The permissions are transferred to the new owner, so the old owner doesn't > have any privileges on the object (and, in your case, cannot connect to > the database any more). However, if the old owner had a pg_hba.conf line that allowed them in, and the new o

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 9:23 AM wrote:- > [postgres] $ psql > psql (14.10) > > You really should add commentary, especially since you never demonstrated the tst role (I advise picking different names for all of the objects in the future) being unable to login. Which they should be able to since

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
De: "David G. Johnston" À: "Laurenz Albe" Cc: "gparc" , "Daniel Gustafsson" , "pgsql-docs" Envoyé: Mercredi 24 Janvier 2024 17:36:43 Objet: Re: SQL command : ALTER DATABASE OWNER TO On Wed, Jan 24, 2024 at 9:13 AM Laurenz Albe < [ mailto:laurenz.a...@cybertec.at | laurenz.a...@cybertec.

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 9:13 AM Laurenz Albe wrote: > On Wed, 2024-01-24 at 08:47 -0700, David G. Johnston wrote: > > I dislike this change, ownership of an object is completely independent > of > > the grant system of privileges. The granted privileges of the old row do > > not transfer to the

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
- Mail original - De: "Laurenz Albe" À: "gparc" , "Daniel Gustafsson" Cc: "pgsql-docs" Envoyé: Mercredi 24 Janvier 2024 16:35:10 Objet: Re: SQL command : ALTER DATABASE OWNER TO On Wed, 2024-01-24 at 15:40 +0100, gp...@free.fr wrote: > maybe a misunderstanding of my part, but your propo

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Laurenz Albe
On Wed, 2024-01-24 at 08:47 -0700, David G. Johnston wrote: > I dislike this change, ownership of an object is completely independent of > the grant system of privileges.  The granted privileges of the old row do > not transfer to the new owner when alter ... owner to is executed.  CREATE TABLE my

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread David G. Johnston
On Wed, Jan 24, 2024 at 8:35 AM Laurenz Albe wrote: > On Wed, 2024-01-24 at 15:40 +0100, gp...@free.fr wrote: > > maybe a misunderstanding of my part, but your proposed modification > doesn't matched > > with the current behaviour of the command as precisely the object > privileges of the old own

Re: Spam complaint

2024-01-24 Thread Alvaro Herrera
On 2024-Jan-24, Laurenz Albe wrote: > For months now, I have received this automated reply whenever I post to > this list: Yeah, me too -- the oldest I can find is 27th November last year, but it's quite possible that I deleted older ones without leaving traces. I unsubscribed this address now, t

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Laurenz Albe
On Wed, 2024-01-24 at 15:40 +0100, gp...@free.fr wrote: > maybe a misunderstanding of my part, but your proposed modification doesn't > matched > with the current behaviour of the command as precisely the object privileges > of the old owner are **NOT** transferred > to the new owner along with t

Incorrect grammar on ALTER EVENT TRIGGER

2024-01-24 Thread Daniel Gustafsson
The ALTER EVENT TRIGGER .. page has an extra TRIGGER in the parameters section for ENABLE/DISABLE parameters which isn't supported in the grammar: https://www.postgresql.org/docs/devel/sql-altereventtrigger.html postgres=# alter event trigger on_login_trigger disable trigger; ERROR: syn

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
Hello, maybe a misunderstanding of my part, but your proposed modification doesn't matched with the current behaviour of the command as precisely the object privileges of the old owner are **NOT** transferred to the new owner along with the ownership Regards Gilles - Mail original -

Spam complaint

2024-01-24 Thread Laurenz Albe
For months now, I have received this automated reply whenever I post to this list: Forwarded Message From: 471266196 <471266...@qq.com> To: Laurenz Albe Subject: 自动回复: Re: SQL command : ALTER DATABASE OWNER TO Date: 01/24/2024 03:23:31 PM 邮件已收到,我会尽快处理。谢谢! --

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Daniel Gustafsson
> On 24 Jan 2024, at 15:23, Laurenz Albe wrote: > > On Wed, 2024-01-24 at 11:08 +0100, gp...@free.fr wrote: >> for this "ALTER DATABASE" form, it should be mentioned that after execution >> of the command, >> the old database owner loses all his privileges on it (even connection) >> although it

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread Laurenz Albe
On Wed, 2024-01-24 at 11:08 +0100, gp...@free.fr wrote: > for this "ALTER DATABASE" form, it should be mentioned that after execution > of the command, > the old database owner loses all his privileges on it (even connection) > although it might > still owns schemas or objects (tables, index,...)

Re: SQL command : ALTER DATABASE OWNER TO

2024-01-24 Thread gparc
Hello, as one of my colleagues fell into the same trap I repeat my request for correction of the documentation on this subject. Many thanks in advance Regards Gilles - Mail original - De: "gparc" À: "pgsql-docs" Envoyé: Mardi 8 Mars 2022 10:50:38 Objet: SQL command : ALTER DATABASE OW

Re: Missing information on '-X' in section 26.3.6.1.

2024-01-24 Thread Daniel Gustafsson
> On 23 Jan 2024, at 21:43, David G. Johnston > wrote: > > On Tue, Jan 23, 2024 at 1:30 PM PG Doc comments form > wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/continuous-archiving.html