Re: Why no pg_has_role(..., 'ADMIN')? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why no pg_has_role(..., 'ADMIN')?
Date
Msg-id 2468702.1726856198@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why no pg_has_role(..., 'ADMIN')?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Why no pg_has_role(..., 'ADMIN')?
List pgsql-general
Robert Haas <robertmhaas@gmail.com> writes:
> I think this already exists. The full list of modes supported by
> pg_has_role() is listed in convert_role_priv_string(). You can do
> something like pg_has_role('alice', 'USAGE WITH ADMIN OPTION'). This
> is not new: it worked in older releases too, but AFAIK it's never been
> mentioned in the documentation.

Surely that's a bad documentation omission.  Do we want to document
all the variants convert_role_priv_string allows?  They appear
functionally equivalent, so I'd be inclined to document just one.
'USAGE WITH ADMIN OPTION' seems a reasonable choice.

            regards, tom lane



pgsql-general by date:

Previous
From: Robert Haas
Date:
Subject: Re: Why no pg_has_role(..., 'ADMIN')?
Next
From: Tom Lane
Date:
Subject: Re: Why no pg_has_role(..., 'ADMIN')?