Re: has_schema_privilege function

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: has_schema_privilege function
Date: 2010-03-09 14:32:40
Message-ID: 407d949e1003090632v742beb10ie132fb42e356ec01@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Tue, Mar 9, 2010 at 10:28 AM, Jignesh Shah
<jignesh(dot)shah1980(at)gmail(dot)com> wrote:
> Could you tell me is there any other robust way to make sure that user1
> doesn't have CREATE permissions on mydb schema?

It depends what you're worried about. If you're worried that plperl
will begin mapping booleans to perl variables differently or Postgres
will change the text representation then you could alter the SQL to
say something like CASE WHEN has_schema_privilege() THEN 1 ELSE 0 END
or whatever constant you prefer like 'yes' and 'no' or 'ok' and ''.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2010-03-09 14:39:17 Re: autovacuum question
Previous Message Raymond O'Donnell 2010-03-09 14:27:20 Re: Urgent help needed- alias name in update statement

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Wood 2010-03-09 15:42:51 Re: Urgent help needed- alias name in update statement
Previous Message Raymond O'Donnell 2010-03-09 14:27:20 Re: Urgent help needed- alias name in update statement