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

Re: Support for invalid foreign keys

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Support for invalid foreign keys
Date: 2011-03-07 06:21:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Le 07/03/2011 06:49, Thom Brown a écrit :
> On 7 March 2011 10:18, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>> On Sun, Mar 6, 2011 at 10:28 PM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)info> wrote:
>>> Hi,
>>> This is a new (as in 9.1) feature we have to support in pgAdmin.
>>> From the git log on
>>>  Add support for invalid foreign key constraints
>>>  This patch adds a checkbox in the dlgForeignKey dialog, so that the
>>>  user can create an "not validated" foreign key. Each foreign key of
>>>  this kind is displayed with the usual icon with a red cross on it. A
>>>  contextual menu allows the user to force the validation of the
>>>  constraint. The user can also do this via the dlgForeignKey dialog.
>> So it basically disables the constraint, leaving it as a sort of
>> documentation of intent?
> Yes, I believe the purpose is to allow the creation of a foreign key
> with far less disruptive locking meaning foreign keys can be created
> in parallel.

Yeah, you first create the constraint without being disruptive (on big
tables), and you validate the constraint at a time the system is less
used (for example during the night when everyone's asleep :) ).

> Guillaume, you appear to have commented out an if container, while
> also adding a condition to it.  Is this supposed to be commented out
> at all?..
> +	//if (sql.IsNull() || forceRefresh)

Well, it was supposed to be deleted. Actually, I was supposed to ask if
anyone knows why there is the "if (sql.IsNull())" check at all (the "||
forceRefresh" is a test I should have deleted). I have no idea why there
is this sql.IsNull() test. It doesn't appear in other same sources.
Dave, any idea?


In response to


pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2011-03-07 06:22:34
Subject: Re: Feature: visual feedback of disabled triggers
Previous:From: Thom BrownDate: 2011-03-07 05:49:28
Subject: Re: Support for invalid foreign keys

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