Problem with function aclcontains, features or bug? - Mailing list pgsql-bugs

From Vadim I. Passynkov
Subject Problem with function aclcontains, features or bug?
Date
Msg-id 3A913A8F.93D4BEB2@axxent.ca
Whole thread Raw
Responses Re: Problem with function aclcontains, features or bug?
List pgsql-bugs
Hi All,

I have some problem with get permission for table/view before make real
SELECT/UPDATE/INSERT/DELETE operations.

spidermon=# \d objects_view
          View "objects_view"
...

spidermon=# \z objects_view
   Access permissions for database "spidermon"
   Relation   |        Access permissions
--------------+----------------------------------
 objects_view | {"=","pvi=r","group netadmin=r"}
(1 row)

spidermon=# SELECT aclcontains ( ( SELECT relacl FROM pg_class where
relname = 'objects_view' ), 'user pvi=r' );
 aclcontains
-------------
 t
(1 row)

It's result OK.
But, next result is wrong.

spidermon=# SELECT aclcontains ( ( SELECT relacl FROM pg_class where
relname = 'objects_view' ), 'user pvi=w' );
 aclcontains
-------------
 t
(1 row)

Same problem with permission for group.

How I can know permission for user/group before make real operations?

FreeBSD 4.2,  postgresql 7.0.3.

Thanks

--

 Vadim I. Passynkov, Axxent Corp.
 mailto:pvi@axxent.ca

pgsql-bugs by date:

Previous
From: Reinhard Max
Date:
Subject: Re: NOTICE: pg_setlocale()
Next
From: Emily Carl
Date:
Subject: Re: Regresstion Tests do not find PGLIB directory