Re: [PATCH] WIP Add ALWAYS DEFERRED option for constraints

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] WIP Add ALWAYS DEFERRED option for constraints
Date: 2017-10-04 12:20:11
Message-ID: VisenaEmail.0.20b08f61e8e55896.15ee460fd40@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

På onsdag 04. oktober 2017 kl. 00:24:19, skrev Vik Fearing <
vik(dot)fearing(at)2ndquadrant(dot)com <mailto:vik(dot)fearing(at)2ndquadrant(dot)com>>:
On 10/03/2017 10:10 PM, Andreas Joseph Krogh wrote:
> While we're in deferrable constraints land...;
> I even more often need deferrable /conditional /unique-indexes.
> In PG you now may have:
>
> ALTER TABLE email_folder ADD CONSTRAINT some_uk UNIQUE (owner_id,
folder_type, name) DEFERRABLE INITIALLY DEFERRED;
>

> But this isn't supported:
>
> CREATE UNIQUE INDEX some_uk ON email_folder(owner_id, folder_type, name)
WHERE parent_id IS NULL DEFERRABLE INITIALLY DEFERRED;
>
> Are there any plans to support this?

I don't want to hijack the thread, but you can do that with exclusion
constraints.
 
 
True.
 
--
Andreas Joseph Krogh
 

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2017-10-04 12:23:22 Re: Partition-wise join for join between (declaratively) partitioned tables
Previous Message Robert Haas 2017-10-04 12:08:36 Re: 64-bit queryId?