Re: WIP: ALTER TABLE ... ALTER CONSTRAINT ... SET DEFERRABLE on UNIQUE or PK

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: ALTER TABLE ... ALTER CONSTRAINT ... SET DEFERRABLE on UNIQUE or PK
Date: 2015-06-26 07:27:34
Message-ID: CAEZATCXhFYvK-G1sm7c-w2PriKZOq7Y4qvrQXVH5ukQjVRwR9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 June 2015 at 07:20, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> Hi all
>
> Attached is a patch to implement ALTER TABLE ... ALTER CONSTRAINT ...
> SET DEFERRABLE on UNIQUE or PRIMARY KEY constraints.
>
> Currently only FOREIGN KEY constraints are supported. Others are rejected with:
>

+1
I was disappointed that this wasn't part of the patch that added
support for it for FKs. What about exclusion constraints? I think
making them work should be more-or-less identical, and then we'll have
support for the full set, since CHECK and NOT NULL constraints can't
currently be deferred.

> constraint \"%s\" of relation \"%s\" is not a foreign key constraint
>
> The patch also adds some regression tests for DEFERRABLE constraints.
>
> The ALTER doesn't take effect in the session it's run in, which makes
> me suspect I need to do additional cache invalidations - maybe the
> index backing the constraint? Anyway, posted here as-is because I'm
> out of time for now and it might be useful for someone who's looking
> for info on this.
>

If you add it to the next commitfest, I'll review it.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oskari Saarenmaa 2015-06-26 07:52:26 thread_test's sched_yield requires -lrt on solaris
Previous Message Craig Ringer 2015-06-26 06:20:01 WIP: ALTER TABLE ... ALTER CONSTRAINT ... SET DEFERRABLE on UNIQUE or PK