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

Re: FK NOT VALID can't be deferrable?

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FK NOT VALID can't be deferrable?
Date: 2011-06-15 08:21:45
Message-ID: BANLkTi=xV-xitHP5fEv8c0eKK+rh9iYW=w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 15 June 2011 07:56, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
> Hi,
>
> Testing the CHECK NOT VALID patch i found $subject... is this intended?
>

I just noticed that too, and was about to raise it as a bug.

If it is intended, then it's not documented.

I noticed it while browsing gram.y, and thought it looks a bit ugly
having 2 almost identical code blocks, one for the normal case and one
for NOT VALID. The second block doesn't have a
ConstraintAttributeSpec, so won't allow any deferrable options.

Aside from the ugliness of the code, we can't just add a
ConstraintAttributeSpec to the second block, because that would
enforce an order to these options.

OTOH adding NOT VALID to ConstraintAttributeSpec is a bit invasive,
since it's used in quite a few places, including CREATE TABLE, where
NOT VALID is never allowed.

Thoughts?

Regards,
Dean

In response to

Responses

pgsql-hackers by date

Next:From: Alexander KorotkovDate: 2011-06-15 08:25:51
Subject: Re: WIP: Fast GiST index build
Previous:From: Rainer PruyDate: 2011-06-15 08:13:18
Subject: Re: procpid?

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