From: karin probost <probost@uni-wuppertal.de>
To: HACKERS <pgsql-hackers@postgresql.org>
To: SQL <pgsql-sql@postgresql.org>
Subject: Operator ~ on type aclitem in pgsql 7.2
Date: Mon, 11 Mar 2002 09:30:18 +0100
Message-ID: <3C8C6B1A.3E690D3D@uni-wuppertal.de> (raw)
Iam testing postgresql 7.2
In postgres 6.5 i used the ~ Operator on type aclitem to search:
has user xyz the permisssion x on table x ?
This is useful to disable update-buttons in the GUI for users
who have only read-permissions.
with the following command as example
select
relname
, relacl
from
pg_class
where
relacl ~ 'nobody=r'::aclitem
and
relname = 'tab1'
;
In 7.2 this command only is successful if r is the only permission
of nobody on the table. To show the effect the following commands:
relname | relacl
---------+------------------------------------
tab1 | {=,probost=arwdRxt,nobody=r}
tab2 | {=,probost=arwdRxt,nobody=arwdRxt}
tab3 | {=,probost=arwdRxt,nobody=r}
(3 rows)
select relname
, relacl
from
pg_class
where
relkind ='r'
and
relname !~ '^pg_'
relname | relacl
---------+------------------------------
tab1 | {=,probost=arwdRxt,nobody=r}
tab3 | {=,probost=arwdRxt,nobody=r}
(2 rows)
select
relname
, relacl
from
pg_class
where
relacl ~ 'nobody=r'::aclitem
;
May I change the syntax of the sql ?
is this an error ?
is there another possibility to reply to the above question ?
--
MfG
-------------------------------------------------------------------------
- Karin Probost
- Bergische Universitaet Wuppertal
- RECHENZENTRUM Raum P-.09.05
- Gaussstr. 20
- D-42097 Wuppertal
- Germany
-
- Tel. : +49 -202 /439 3151 ,Fax -2910
--Email: probost@uni-wuppertal.de
--Home : http://www.hrz.uni-wuppertal.de/hrz/personen/k_probost.html
-------------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: probost@uni-wuppertal.de, pgsql-hackers@postgresql.org
Subject: Re: Operator ~ on type aclitem in pgsql 7.2
In-Reply-To: <3C8C6B1A.3E690D3D@uni-wuppertal.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox