Re: using index or check in ALTER TABLE SET NOT NULL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: using index or check in ALTER TABLE SET NOT NULL
Date
Msg-id 11336.1511972107@sss.pgh.pa.us
Whole thread Raw
In response to Re: using index or check in ALTER TABLE SET NOT NULL  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I did not look at the patch yet, but TBH if it uses SPI for sub-operations
>> of ALTER TABLE I think that is sufficient reason to reject it out of hand.

> You mean like what ALTER TABLE ... ADD FOREIGN KEY does?

Yeah, and if you look at the warts that SPI has grown to support that
usage, you'll see why I'm so unhappy.  We should never have allowed
FKs to be built on top of SPI; they require semantics that don't exist
in SQL.  I think this would lead to more of the same --- not exactly
the same of course, but more warts.  See Robert's nearby musings about
semantics of index null checks for an example.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL
Next
From: Stephen Frost
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL