Re: operator exclusion constraints - Mailing list pgsql-hackers

From Tom Lane
Subject Re: operator exclusion constraints
Date
Msg-id 29451.1260126383@sss.pgh.pa.us
Whole thread Raw
In response to Re: operator exclusion constraints  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: operator exclusion constraints  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Aha -- I think I see the problem you're having: if you try to rewrite
> one of the columns contained in the exclusion constraint, you get that
> error:

It fails for me regardless of which column is actually modified.
It could be this is a consequence of other changes I've been making,
but given the way ALTER TABLE works it's hard to see why the specific
column being modified would matter.  Anything that forces a table
rewrite would lead to running through this code path.

I don't really agree with your argument that it's okay to reject the
case of altering the underlying column type, anyhow.  There's enough
commonality of operator names that it's sensible to try to preserve
the constraint across a change.  Consider replacing a circle with a
polygon, say.  A no-overlap restriction is still sensible.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: operator exclusion constraints
Next
From: Jeff Davis
Date:
Subject: Re: operator exclusion constraints