On Wed, Nov 25, 2015 at 1:43 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> This is a known limitation of the backend. It should refuse to let you
> DROP NOT NULL in a case where the NOT NULL is an inherited constraint,
> as it is here. It would not let you drop a CHECK constraint in an
> equivalent situation; but the NOT NULL support is older/more primitive
> and currently doesn't do enough bookkeeping to realize that a03's NOT NULL
> constraint is inherited from a parent table. Fixing that is on our to-do
> list, but it hasn't been very high priority.
Just an update for pinker: I have posted a patch here to address the
problem in the next major releases, 10.0 presumably:
https://www.postgresql.org/message-id/CAB7nPqTPXgX9HiyhhtAgpW7jbA1iskMCSoqXPEEB_KYXYy1E1Q@mail.gmail.com
--
Michael