Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Peter Childs <Blue(dot)Dragon(at)blueyonder(dot)co(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Date: 2003-09-30 14:07:51
Message-ID: 19140.1064930871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Stephan Szabo wrote:
>> The problem I have with a super-user only solution is that it doesn't
>> solve the problem for restores in general.

> OK. Let's explore that. What does ownership mean?

It does not normally mean the ability to bypass consistency checks;
for example, if you put a CHECK constraint on a table, you don't get
to violate it because you own the table. (Of course superuserness
doesn't let you do so either...)

I see where Stephan is coming from, but in my mind disabling consistency
checks ought to be a feature reserved to the DBA (ie superuser), who
presumably has some clue about the tradeoffs involved. I don't think
ordinary users should be able to do it. If we can get the cost of
performing the initial check down to something reasonable (and I don't
mean "near zero", I mean something that's small in comparison to the
other costs of loading data and creating indexes), then I think we've
done as much as we should do for ordinary users.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Phil Campaigne 2003-09-30 14:10:03 psql error: cannot open libpq.so.3
Previous Message Robert Creager 2003-09-30 14:06:25 Re: Divide by zero...

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-30 14:34:26 Re: Possible Commit Syntax Change for Improved TPS
Previous Message Tom Lane 2003-09-30 13:58:01 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)