has_schema_privilege function

From: dipti shah <shahdipti1980(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: has_schema_privilege function
Date: 2010-03-09 08:53:03
Message-ID: d5b05a951003090053r13df0187u54273e631cb778fc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Hi,

I refered
http://www.postgresql.org/docs/8.4/static/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE
and
got to know that I can fetch the information about permissions on schema.

Below commands work fine:

SELECT has_schema_privilege('user1', 'mydb', 'USAGE');
SELECT has_schema_privilege('user1', 'mydb', 'CREATE');

...But I want to check whether user has ALL permissions or not. Below
doesn;t work.

SELECT has_schema_privilege('user1', 'mydb', 'ALL');

Do I have to check both USAGE and CREATE permissions to check ALL
permissions?

Thanks.

Browse pgsql-general by date

  From Date Subject
Next Message Rodger Donaldson 2010-03-09 09:01:52 Re: kernel version impact on PostgreSQL performance
Previous Message Ian Barwick 2010-03-09 08:50:45 Unexpected result from selecting an aliased but non-existing column called "name"

Browse pgsql-novice by date

  From Date Subject
Next Message Jasen Betts 2010-03-09 10:15:16 Re: Entering a character code in a query
Previous Message Greg Smith 2010-03-09 07:15:32 Re: [NOVICE] How to read oracle table's data from postgre