Re: Postgres db corrupted ? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Postgres db corrupted ?
Date
Msg-id 15481.1059582400@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres db corrupted ?  ("Mendola Gaetano" <mendola@bigfoot.com>)
List pgsql-admin
"Mendola Gaetano" <mendola@bigfoot.com> writes:
> but you agree anyway that should not possible delete
> a user that own DB object or at least change the owner
> to postgres?

If you do it the approved way, with DROP USER, you'll find there's
already an interlock:

regression=# create user foo;
CREATE USER
regression=# create database foo owner foo;
CREATE DATABASE
regression=# drop user foo;
ERROR:  user "foo" cannot be dropped
DETAIL:  The user owns database "foo".
regression=#

When you issue direct UPDATE/DELETEs on the system catalogs, consistency
is your responsibility.

            regards, tom lane

pgsql-admin by date:

Previous
From: Dani Oderbolz
Date:
Subject: Re: Partition DB Tables by month
Next
From: "Mendola Gaetano"
Date:
Subject: Re: parallel regression test failure