Thanks, this is exactly what I was
looking for.
One more question: changing this attribute will present is no side effects? Thanks,
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" permissionfor all users, in order thateven 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 droppingdatabases in use - I just want to makeeven 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 |
- [GENERAL] Revoke "drop database" even for supe... Edson Richter
- Re: [GENERAL] Revoke "drop database" even... Albe Laurenz
- Re: [GENERAL] Revoke "drop database" ... Edson Richter
- Re: [GENERAL] Revoke "drop database" ... Andres Freund
- Re: [GENERAL] Revoke "drop database&qu... Tom Lane
- Re: [GENERAL] Revoke "drop databas... Edson Richter
- Re: [GENERAL] Revoke "drop database" even... Guillaume Lelarge
- Re: [GENERAL] Revoke "drop database" ... Edson Richter
- Re: [GENERAL] Revoke "drop database&qu... Guillaume Lelarge
- Re: [GENERAL] Revoke "drop database" ... Edson Richter
- Re: [GENERAL] Revoke "drop database&qu... Chris Angelico
- Re: [GENERAL] Revoke "drop databas... Edson Richter
- Re: [GENERAL] Revoke "drop da... Pavan Deolasee