pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
To: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org, richard coleman <rcoleman.ascentgl@gmail.com>
Subject: Re: how to list privileges on the database object itself via SQL?
Date: Wed, 26 Apr 2023 20:29:51 +0200 (CEST)
Message-ID: <874394544.1204470.1682533791565@office.mailbox.org> (raw)
In-Reply-To: <fd81361e-fa84-1d75-d944-1c590de0e424@jakobs.com>
References: <CAGA3vBvanu7UBtaaVv9PH25Ko==5F2wewhPWTTra8wqexdDAdQ@mail.gmail.com>
	<2058602074.1048315.1682529431551@office.mailbox.org>
	<CAGA3vBtQKHuX2XLOq31-k+iywhsHwWTUTjBiAyZJmtXZutQB+Q@mail.gmail.com>
	<fd81361e-fa84-1d75-d944-1c590de0e424@jakobs.com>

> On 26/04/2023 19:55 CEST Holger Jakobs <holger@jakobs.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





view thread (26+ messages)  latest in thread

Message-ID: <874394544.1204470.1682533791565@office.mailbox.org>
Permalink:  ../874394544.1204470.1682533791565@office.mailbox.org/
Also on:    postgresql.org/message-id/874394544.1204470.1682533791565@office.mailbox.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ewie@ewie.name, holger@jakobs.com, rcoleman.ascentgl@gmail.com
  Subject: Re: how to list privileges on the database object itself via SQL?
  In-Reply-To: <874394544.1204470.1682533791565@office.mailbox.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox