Re: Postgres db corrupted ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mendola Gaetano" <mendola(at)bigfoot(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgres db corrupted ?
Date: 2003-07-30 16:26:40
Message-ID: 15481.1059582400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Mendola Gaetano" <mendola(at)bigfoot(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mendola Gaetano 2003-07-30 16:40:21 Re: parallel regression test failure
Previous Message Dani Oderbolz 2003-07-30 16:17:06 Re: Partition DB Tables by month