Problem with function aclcontains, features or bug?

From: "Vadim I(dot) Passynkov" <pvi(at)axxent(dot)ca>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Problem with function aclcontains, features or bug?
Date: 2001-02-19 15:23:59
Message-ID: 3A913A8F.93D4BEB2@axxent.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)axxent(dot)ca

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-02-19 16:00:20 Not able to connect to PostgreSQL in Linux!
Previous Message Reinhard Max 2001-02-19 12:45:23 Re: NOTICE: pg_setlocale()