Re: How to implement a uniqueness constraint across multiple tables?

From: Kynn Jones <kynnjo(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to implement a uniqueness constraint across multiple tables?
Date: 2014-08-01 13:05:54
Message-ID: CAFvQaj66Wq5y+bHM4-x9TkMZfWVeptsLtjp3SZiwekCrvrDdvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 31, 2014 at 3:52 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:

This goes beyond the capabilities of declarative constraints to
> enforce. You can enforce it using triggers, but you need to handle
> race conditions, which is not easy with MVCC behavior (where reads
> don't block anything and writes don't block reads). There are
> basically two ways to cover that:
>
<snip>

Thanks for the detailed response. It gives me much to work with/follow-up
on.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Larry White 2014-08-01 14:12:19 Re: Very Limited Toast Compression on JSONB (9.4 beta 2)
Previous Message Kynn Jones 2014-08-01 13:04:45 Re: How to implement a uniqueness constraint across multiple tables?