Re: Views and permissions

From: Christian Schröder <cs(at)deriva(dot)de>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Views and permissions
Date: 2008-01-21 10:47:15
Message-ID: 47947833.3030605@deriva.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Albe Laurenz wrote:
> One possibility I see is that there is more than one table
> called "EDITORS" and they get confused.
>
> What do you get when you
>
> SELECT t.oid, n.nspname, t.relname
> FROM pg_catalog.pg_class t JOIN
> pg_catalog.pg_namespace n ON t.relnamespace = n.oid
> WHERE t.relname='EDITORS';
>
As expected, there is only one table:

oid | nspname | relname
---------+---------+---------
3045229 | public | EDITORS
(1 row)

> Can you show us the permissions for "ts_frontend.v_editors" as well
> as for any "EDITORS" table you find (e.g. using \z in psql).
>
Access privileges for database
"zertifikate"
Schema | Name | Type |
Access privileges
--------+---------+-------+------------------------------------------------------------------------------------------------------
public | EDITORS | table |
{chschroe=arwdxt/chschroe,zert_readers=r/chschroe,zert_writers=arwd/chschroe,ts_frontend=x/chschroe}
(1 row)

Access privileges for database "zertifikate"
Schema | Name | Type | Access
privileges
-------------+-----------+------+-------------------------------------------------------------------------
ts_frontend | v_editors | view |
{ts_frontend=arwdxt/ts_frontend,www=r/ts_frontend,backup=r/ts_frontend}
(1 row)

The user "www" is a member of the "zert_readers" group:

zertifikate=# select pg_has_role('www', 'zert_readers', 'MEMBER');
pg_has_role
-------------
t
(1 row)

I have also tried to drop and recreate the view, but it didn't help.

Regards,
Christian

--
Deriva GmbH Tel.: +49 551 489500-42
Financial IT and Consulting Fax: +49 551 489500-91
Hans-Böckler-Straße 2 http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harald Armin Massa 2008-01-21 12:41:53 suggested wording improvement in psql
Previous Message Jan Sunavec 2008-01-21 10:05:33 Tsearch2 slovak UTF-8