Search Postgresql Archives

Re: REFERENCES ignored when there is inheritance?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 13, 2005 at 11:57:08AM +0200,
 Stephane Bortzmeyer <bortzmeyer@xxxxxx> wrote 
 a message of 49 lines which said:

> I have 240 countries in the database. Because of a programming error,
> contacts were entered with a country > 240. I thought that the
> "REFERENCES Countries (id)" should have prevented it. Is it because of
> inheritance?

Yes, it is even documented :-(

http://www.postgresql.org/docs/7.4/interactive/ddl-inherit.html

I agree with the comments at the end. Having, as a workaround, to add
a FOREIGN KEY REFERENCES to every child table defeats a lot of the
purpose of inheritance.

It does not seem to be better in 8.0:

http://www.postgresql.org/docs/8.0/interactive/ddl-inherit.html

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux