Skip site navigation (1) Skip section navigation (2)

Re: ADD FOREIGN KEY

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Christopher Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ADD FOREIGN KEY
Date: 2003-10-01 18:02:52
Message-ID: 8m5mnvg8rtttte9nf1uhe2uhgn6cl04eik@4ax.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Tue, 30 Sep 2003 08:00:07 -0400, Christopher Browne
<cbbrowne(at)acm(dot)org> wrote:
>I would be pretty "game" for a near-single-user-mode approach that
>would turn off some of the usual functionality that we knew we didn't
>need because the data source was an already-committed-and-FK-checked
>set of data.

Single user mode is a good idea, IMHO.  But it should only make sure
that there is not more than one user connected to the database (or to
the postmaster).  Everything else should depend on special GUC
variables that are only settable in single user mode:

db=> SET disable-fk-verification = true;
ERROR: "disable-fk-verification" can only be set in single user mode
db=> SET SINGLE USER MODE ON;
ERROR: permission denied
HINT: Must be superuser or owner of database "db".
db=> \c - dbo
You are now connected as new user "dbo".
db=> SET SINGLE USER MODE ON;
ERROR: cannot enter single user mode
HINT: You are not the only user connected to database "db".
-- after other users have logged out ...
db=> SET SINGLE USER MODE ON;
SET
db=> SET disable-fk-verification = true;
SET

Single user mode would also help in several cases where now a
standalone backend is required ...

Servus
 Manfred

In response to

Responses

pgsql-hackers by date

Next:From: David BlasbyDate: 2003-10-01 18:50:40
Subject: query plan different for "SELECT ..." and "DECLARE CURSOR ..."?
Previous:From: Joshua D. DrakeDate: 2003-10-01 17:58:51
Subject: Re: Thoughts on maintaining 7.3

pgsql-general by date

Next:From: Jan WieckDate: 2003-10-01 18:12:36
Subject: Re: Divide by zero...
Previous:From: Dann CorbitDate: 2003-10-01 18:01:59
Subject: Re: PGAdmin III 1.0.0 Released

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group