Search Postgresql Archives

Re: dropdb ; createdb equivalent without createdb permission?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Olsen wrote:
> Hello,
> 
> I would like to be able to grant a user the ability to completely
> reset a database for testing purposes.  If possible, I would like the
> user to be able to do a "dropdb" followed by a "createdb", but without
> allowing this user to create any database.  In other words, I would
> 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?

As an alternative, how about a separate database cluster. A user can run
their own copy of PostgreSQL - just initdb but set the directory to
someplace that user has appropriate access privilege. This might require
use of a different port if PostgreSQL is already running on that machine
but then your user is free to create, change, test and destroy as they
see fit.

Or I suppose you could drop...cascade all the user tables, views, etc.
in the database and then do a vacuum full.

Cheers,
Steve


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux