Re: dropdb ; createdb equivalent without createdb permission?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dropdb ; createdb equivalent without createdb permission?
Date: 2007-07-09 18:50:02
Message-ID: 25426.1184007002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Sullivan <ajs(at)crankycanuck(dot)ca> writes:
> On Mon, Jul 09, 2007 at 02:13:55PM -0400, Tim Olsen wrote:
>> like the user to be granted createdb permission for only a particular
>> database. I don't believe this is possible in postgresql. Is there a
>> dropdb-followed-by-createdb equivalent the user could use?

> You could, however, limit all of this by giving sudo access to the
> person in question, where the sudo access is for a (set of) script(s)
> that achieve what you want (e.g. scripts with the appropriate
> createdb, psql -c "something" &c. inside them).

A SECURITY DEFINER function (living in some other database of course)
could accomplish this without going outside Postgres.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-07-09 18:51:45 Re: dropdb ; createdb equivalent without createdb permission?
Previous Message Tim Olsen 2007-07-09 18:42:17 Re: dropdb ; createdb equivalent without createdb permission?