pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mendola Gaetano <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres db corrupted ?
Date: Wed, 30 Jul 2003 12:26:40 -0400
Message-ID: <15481.1059582400@sss.pgh.pa.us> (raw)
In-Reply-To: <002d01c356b3$d909d1e0$32add6c2@mm.eutelsat.org>
References: <1059470890.5588.41.camel@cosimo.hosting365.ie>
	<00ac01c3562c$18a76840$10d4a8c0@mm.eutelsat.org>
	<9583.1059575218@sss.pgh.pa.us>
	<001b01c356a8$e3bacaf0$32add6c2@mm.eutelsat.org>
	<9965.1059576879@sss.pgh.pa.us>
	<002d01c356b3$d909d1e0$32add6c2@mm.eutelsat.org>

"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



view thread (13+ messages)  latest in thread

Message-ID: <15481.1059582400@sss.pgh.pa.us>
Permalink:  ../15481.1059582400@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15481.1059582400@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mendola@bigfoot.com
  Subject: Re: Postgres db corrupted ?
  In-Reply-To: <15481.1059582400@sss.pgh.pa.us>
  References: <1059470890.5588.41.camel@cosimo.hosting365.ie> <00ac01c3562c$18a76840$10d4a8c0@mm.eutelsat.org> <9583.1059575218@sss.pgh.pa.us> <001b01c356a8$e3bacaf0$32add6c2@mm.eutelsat.org> <9965.1059576879@sss.pgh.pa.us> <002d01c356b3$d909d1e0$32add6c2@mm.eutelsat.org> <15481.1059582400@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox