From: | Edson Richter <richter(at)simkorp(dot)com(dot)br> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Revoke "drop database" even for superusers? |
Date: | 2012-11-09 21:35:23 |
Message-ID: | 509D771B.6030205@simkorp.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks, this is exactly what I was looking for.
One more question: changing this attribute will present is no side effects?
Thanks,
*Edson Carlos Ericksson Richter*
/SimKorp Informática Ltda/
Fone: (51) 3366-7964
Celular: (51)9318-9766/(51) 8585-0796
Embedded Image
Em 09/11/2012 09:42, Albe Laurenz escreveu:
> Edson Richter wrote:
>> I've a bunch of databases that cannot be dropped in any case.
>>
>> I was wondering if it is possible to revoke "drop database" permission
> for all users, in order that
>> even superuser, if he wishes to drop a database, he will need first to
> "grant drop database" first.
>> I know there is already a safety that does not allow dropping
> databases in use - I just want to make
>> even harder.
> You cannot play it over permissions, but what about the following trick:
>
> postgres=# CREATE DATABASE persist;
> CREATE DATABASE
> postgres=# UPDATE pg_database SET datistemplate=TRUE WHERE
> datname='persist';
> UPDATE 1
> postgres=# DROP DATABASE persist;
> ERROR: cannot drop a template database
>
> Yours,
> Laurenz Albe
>
From | Date | Subject | |
---|---|---|---|
Next Message | George Weaver | 2012-11-09 21:45:38 | Re: View using dblink fails if not able to make connection |
Previous Message | Kevin Grittner | 2012-11-09 21:06:03 | Re: Phantom read example for new Repeatable Read level |