Re: operator exclusion constraints

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, Jeff Davis <pgsql@j-davis.com>, Simon Riggs <simon@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2009-11-05T14:50:30Z
Lists: pgsql-hackers
Robert Haas escribió:
> On Thu, Nov 5, 2009 at 9:01 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

> > Or as table constraint
> >
> > EXCLUSIVE (a, b) BY =
> >
> > And then you could think of UNIQUE as "EXCLUSIVE BY default-equals-op".
> >
> > EXCLUSIVE is already a key word, by the way.
> 
> Ooh, that's kind of neat.  But I think you'd need EXCLUSIVE (a, b) BY
> (=, =), since it could equally well be EXCLUSIVE (a, b) BY (=, &&).

Perhaps EXCLUSIVE (a BY =, b BY =)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.