Re: REFERENCES ignored when there is inheritance?

Поиск
Список
Период
Сортировка
От Stephane Bortzmeyer
Тема Re: REFERENCES ignored when there is inheritance?
Дата
Msg-id 20050513120159.GA25857@nic.fr
обсуждение исходный текст
Ответ на REFERENCES ignored when there is inheritance?  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Список pgsql-general
On Fri, May 13, 2005 at 11:57:08AM +0200,
 Stephane Bortzmeyer <bortzmeyer@nic.fr> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Victor Spång Arthursson
Дата:
Сообщение: Huge problem with upper/lower and foreign chars
Следующее
От: "Relyea, Mike"
Дата:
Сообщение: Re: MS-Access and Stored procedures