Re: [GENERAL] possible bug with inheritance? - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: [GENERAL] possible bug with inheritance?
Date
Msg-id 20100217171824.A5BA.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: [GENERAL] possible bug with inheritance?  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [GENERAL] possible bug with inheritance?
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> wrote:

> Summary:  ALTER TABLE SET NOT NULL on a parent table is passed to the
> child, while ALTER TABLE ADD PRIMARY KEY is not, particularly the NOT
> NULL part of the PRIMARY KEY specification.
> 
> That does seem like something that should be fixed.

Yeah, the issue is in our TODO list:
http://wiki.postgresql.org/wiki/Todo
| Move NOT NULL constraint information to pg_constraint
|   Currently NOT NULL constraints are stored in pg_attribute without
|   any designation of their origins, e.g. primary keys. One manifest
|   problem is that dropping a PRIMARY KEY constraint does not remove
|   the NOT NULL constraint designation. Another issue is that we should
|   probably force NOT NULL to be propagated from parent tables to children,
|   just as CHECK constraints are. (But then does dropping PRIMARY KEY
|   affect children?)

And the same bug report has been here:
http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org
| BUG #5064: not-null constraints is not inherited

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: NaN/Inf fix for ECPG
Next
From: Joachim Wieland
Date:
Subject: Listen/Notify payload and interfaces