Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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.

pgsql-novice by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group