Re: Users and object privileges maintenance

2024-02-19 Thread gparc
On 18.02.2024 15 :19, Dominique Devienne wrote: ... ... But you of course can connect only to DBs you have explicit access to. Just beware that before 15, the built-in PUBLIC role, which all ROLEs are implicitly members of, had implicit access to newly created DBs. It's still the same c

Re: Users and object privileges maintenance

2024-02-18 Thread David G. Johnston
On Sun, Feb 18, 2024, 11:35 Dominique Devienne wrote: > On Sun, Feb 18, 2024 at 4:33 PM Pavel Luzanov > wrote: > >> On 18.02.2024 17:40, Dominique Devienne wrote: >> >> Well, membership in a role mean you can "become that role", no? >> >> Since v16, no. There is now a grant option that controls

Re: Users and object privileges maintenance

2024-02-18 Thread Dominique Devienne
On Sun, Feb 18, 2024 at 4:33 PM Pavel Luzanov wrote: > On 18.02.2024 17:40, Dominique Devienne wrote: > > Well, membership in a role mean you can "become that role", no? Thus this > seems logical, > and not confusing to me, that you can act as the owner, since you SET ROLE > to the owner. > > The

Re: Users and object privileges maintenance

2024-02-18 Thread Adrian Klaver
On 2/18/24 02:12, Dominique Devienne wrote: On Sat, Feb 17, 2024 at 10:50 PM Lok P > wrote: We were having past experience in Oracle and are newly getting moved to postgres database. [...] So I just wanted to understand if these grants and privileges for

Re: Users and object privileges maintenance

2024-02-18 Thread Pavel Luzanov
On 18.02.2024 17:40, Dominique Devienne wrote: Well, membership in a role mean you can "become that role", no? Thus this seems logical, and not confusing to me, that you can act as the owner, since you SET ROLE to the owner. They may acts as the owner even without explicit SET ROLE to the owne

Re: Users and object privileges maintenance

2024-02-18 Thread Dominique Devienne
On Sun, Feb 18, 2024 at 3:27 PM Pavel Luzanov wrote: > On 18.02.2024 15:19, Dominique Devienne wrote: > > On Sun, Feb 18, 2024 at 12:30 PM Laurenz Albe > wrote: > > >> 2. In PostgreSQL, there is the important concept of ownership, which is >> not tied to the schema. >>The owner is the user w

Re: Users and object privileges maintenance

2024-02-18 Thread Pavel Luzanov
On 18.02.2024 15:19, Dominique Devienne wrote: On Sun, Feb 18, 2024 at 12:30 PM Laurenz Albe wrote: 2. In PostgreSQL, there is the important concept of ownership, which is not tied to the schema.    The owner is the user who created the object. Personally I find that confusing. I

Re: Users and object privileges maintenance

2024-02-18 Thread Dominique Devienne
On Sun, Feb 18, 2024 at 12:30 PM Laurenz Albe wrote: > 1. Schemas and users are not tied together, they are orthoginal concepts. > Just like operating >system users and directories (and indeed all other databases). > Forgot about that one! OTOH, you could say PostgreSQL has tied USERs and RO

Re: Users and object privileges maintenance

2024-02-18 Thread Laurenz Albe
On Sun, 2024-02-18 at 11:12 +0100, Dominique Devienne wrote: > On Sat, Feb 17, 2024 at 10:50 PM Lok P wrote: > > We were having past experience in Oracle and are newly getting moved to > > postgres database. [...] > > So I just wanted to understand if these grants and privileges for > > objects/

Re: Users and object privileges maintenance

2024-02-18 Thread Dominique Devienne
On Sat, Feb 17, 2024 at 10:50 PM Lok P wrote: > We were having past experience in Oracle and are newly getting moved to > postgres database. [...] > So I just wanted to understand if these grants and privileges for > objects/users are given and maintained in a similar way in postgres database >

Users and object privileges maintenance

2024-02-17 Thread Lok P
Hello All, We were having past experience in Oracle and are newly getting moved to postgres database. In there we have schema which alternately also called as Users and the super user was sys/system through which the dev team never login but only DBA does. And DBA used to create some functional us