Re: operator exclusion constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator exclusion constraints
Date: 2009-11-01 23:07:54
Message-ID: 2570.1257116874@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> The syntax be easier to read if it was stated as a comparison
> e.g. in the circle example
> CHECK ( NOT (NEW.c && c)) USING GIST

I don't think this is a good idea at all. NEW is a nonstandard
Postgres-ism, and introducing it into this syntax doesn't seem very
future-proof to me. What's more, the above is not in the least
analogous to a regular CHECK constraint, because there's some implicit
notion of "c" ranging over all other rows, which is not what is meant
by the same column reference in a CHECK constraint.

I agree that the proposed syntax is a bit awkward, but this isn't
better.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-11-01 23:42:10 Re: operator exclusion constraints
Previous Message Nathan Boley 2009-11-01 23:06:43 Re: operator exclusion constraints