Re: how to list privileges on the database object itself via SQL?

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Holger Jakobs <holger(at)jakobs(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org, richard coleman <rcoleman(dot)ascentgl(at)gmail(dot)com>
Subject: Re: how to list privileges on the database object itself via SQL?
Date: 2023-04-26 18:29:51
Message-ID: 874394544.1204470.1682533791565@office.mailbox.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On 26/04/2023 19:55 CEST Holger Jakobs <holger(at)jakobs(dot)com> wrote:
>
> Am 26.04.23 um 19:53 schrieb richard coleman:
>
> > ERROR: role "role" does not exist
> > LINE 3: WHERE grantee = 'role'::regrole AND privilege_type I...
> > ^
> > SQL state: 42704
> > Character: 151
>
> If you want to use the SQL statements used by psql on older versions of
> PostgreSQL, you should use the old version of psql.

'role'::regrole works perfectly fine since pg9.5 if the role exists.
Use grantee::regrole::text = 'role' to be safe.

--
Erik

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message richard coleman 2023-04-26 18:30:07 Re: how to list privileges on the database object itself via SQL?
Previous Message richard coleman 2023-04-26 18:28:57 Re: how to list privileges on the database object itself via SQL?