From: | karin probost <probost(at)uni-wuppertal(dot)de> |
---|---|
To: | HACKERS <pgsql-hackers(at)postgresql(dot)org>, SQL <pgsql-sql(at)postgresql(dot)org> |
Subject: | Operator ~ on type aclitem in pgsql 7.2 |
Date: | 2002-03-11 08:30:18 |
Message-ID: | 3C8C6B1A.3E690D3D@uni-wuppertal.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
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(at)uni-wuppertal(dot)de
--Home : http://www.hrz.uni-wuppertal.de/hrz/personen/k_probost.html
-------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Alberto Amigo Navarro | 2002-03-11 09:45:22 | need help on tuning tpch |
Previous Message | Lincoln Yeoh | 2002-03-11 08:30:03 | Re: Allowing usernames in pg_hba.conf |
From | Date | Subject | |
---|---|---|---|
Next Message | adm | 2002-03-11 10:39:14 | Re: PL/pgsql |
Previous Message | Joel Burton | 2002-03-11 07:28:43 | Re: Case (in)sensitivity |