RE: New predefined roles- 'pg_read/write_all_data'

From: "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi(dot)shinoda(at)hpe(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, "gkokolatos(at)pm(dot)me" <gkokolatos(at)pm(dot)me>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: New predefined roles- 'pg_read/write_all_data'
Date: 2021-09-05 23:53:36
Message-ID: TU4PR8401MB1152491214E4858079A734E8EED19@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for your quick response.
I understood the specifications from your explanation.

Regards,
Noriyoshi Shinoda

From: Stephen Frost [mailto:sfrost(at)snowman(dot)net]
Sent: Sunday, September 5, 2021 8:50 PM
To: Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi(dot)shinoda(at)hpe(dot)com>
Cc: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>; Michael Banck <michael(dot)banck(at)credativ(dot)de>; gkokolatos(at)pm(dot)me; pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: New predefined roles- 'pg_read/write_all_data'

Greetings,

On Sun, Sep 5, 2021 at 07:43 Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi(dot)shinoda(at)hpe(dot)com<mailto:noriyoshi(dot)shinoda(at)hpe(dot)com>> wrote:
I have tested this new feature with PostgreSQL 14 Beta 3 environment.
I created a user granted with pg_write_all_data role and executed UPDATE and DELETE statements on tables owned by other users.
If there is no WHERE clause, it can be executed as expected, but if the WHERE clause is specified, an error of permission denied will occur.
Is this the expected behavior?

A WHERE clause requires SELECT rights on the table/columns referenced and if no SELECT rights were granted then a permission denied error is the correct result, yes. Note that pg_write_all_data, as documented, does not include SELECT rights.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-09-06 00:11:10 Re: strange case of "if ((a & b))"
Previous Message Tom Lane 2021-09-05 22:43:45 Re: [PATCH] postgres_fdw: suppress explicit casts in text:text comparisons (was: column option to override foreign types)