Обсуждение: Re: [PATCH] pg_permissions

Поиск
Список
Период
Сортировка

Re: [PATCH] pg_permissions

От
"Joel Jacobson"
Дата:
On Thu, Mar 11, 2021, at 08:00, Joel Jacobson wrote:
> 0004-pg_permissions-and-pg_ownerships.patch

Having gotten some hands-on experience of these views for a while,
I notice I quite often want to check the ownerships/permissions
for some specific type of objects, or in some specific schema.

The current patch returns pg_describe_object() as the "objdesc" column.

Would it be a better idea to instead return the fields from pg_identify_object()?
This would allow specifically filtering on "type", "schema", "name" or "identity"
instead of having to apply a regex/LIKE on the object description.

/Joel

Re: [PATCH] pg_permissions

От
Alvaro Herrera
Дата:
On 2021-Mar-23, Joel Jacobson wrote:

> On Thu, Mar 11, 2021, at 08:00, Joel Jacobson wrote:
> > 0004-pg_permissions-and-pg_ownerships.patch
> 
> Having gotten some hands-on experience of these views for a while,
> I notice I quite often want to check the ownerships/permissions
> for some specific type of objects, or in some specific schema.
> 
> The current patch returns pg_describe_object() as the "objdesc" column.
> 
> Would it be a better idea to instead return the fields from pg_identify_object()?
> This would allow specifically filtering on "type", "schema", "name" or "identity"
> instead of having to apply a regex/LIKE on the object description.

For programmatic use it is certainly better to use the object identity
rather than the description.  Particularly because the description gets
translated, and the identity doesn't.

-- 
Álvaro Herrera       Valdivia, Chile