Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-16 Thread dipti shah
Hey Kretschemer, the has_table_privilege function returns true in following situation as well which is wrong. techdb= select pc.relname, pc.relacl from pg_class pc, pg_namespace pn where pc.relnamespace=pn.oid and pn.nspname='techdb' and pc.relname='techtable'; relname|

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-16 Thread dipti shah
It is strange. If I remove both SELECT and INSERT then works fine but if either of is there then it doesn't work. techdb= SELECT has_table_privilege('user1', 'techdb.techtable', 'UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'); has_table_privilege - t (1 row) techdb=

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-16 Thread dipti shah
Okay I got to know from http://www.postgresql.org/docs/8.4/interactive/functions-info.html that the has_table_privilege returns true if any of the listed privilege is held. Then how can I find whether user has all the specified permissions or not? From

[GENERAL] How to get whether user has ALL permissions on table?

2010-04-15 Thread dipti shah
Hi, I have granted ALL permissions on 'techtable' to 'user1'. techdb=# select pc.relname, pc.relacl from pg_class pc, pg_namespace pn where pc.relnamespace=pn.oid and pn.nspname='techdb' and pc.relname='techtable'; relname | relacl

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-15 Thread A. Kretschmer
In response to dipti shah : Hi, I have granted ALL permissions on 'techtable' to 'user1'.    techdb=# select pc.relname, pc.relacl from pg_class pc, pg_namespace pn where pc.relnamespace=pn.oid and pn.nspname='techdb' and pc.relname='techtable';  relname   | 

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-15 Thread dipti shah
Thanks Kretschmer but I have seen those function. The below query returns error but you could see that 'user1' has ALL permissions on table 'techtable'. techdb=# SELECT has_table_privilege('user1', 'techtable', 'ALL'); ERROR: unrecognized privilege type: ALL techdb=# select pc.relname,

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-15 Thread A. Kretschmer
In response to dipti shah : Thanks Kretschmer but I have seen those function. The below query returns error but you could see that 'user1' has ALL permissions on table 'techtable'.   techdb=# SELECT has_table_privilege('user1', 'techtable', 'ALL'); ERROR:  unrecognized privilege type: ALL  

Re: [GENERAL] How to get whether user has ALL permissions on table?

2010-04-15 Thread dipti shah
Okay. Thanks. Dipti. On Thu, Apr 15, 2010 at 3:20 PM, A. Kretschmer andreas.kretsch...@schollglas.com wrote: In response to dipti shah : Thanks Kretschmer but I have seen those function. The below query returns error but you could see that 'user1' has ALL permissions on table