Re: bug in 8.3? foreign key refers to different type

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: bug in 8.3? foreign key refers to different type
Дата
Msg-id 20080226171221.T54269@megazone.bigpanda.com
обсуждение исходный текст
Ответ на bug in 8.3? foreign key refers to different type  (craigp <craigp98072@yahoo.com>)
Ответы Re: bug in 8.3? foreign key refers to different type
Список pgsql-general
On Tue, 26 Feb 2008, craigp wrote:

> These create table commands succeed, even tho the foreign key refers to
> a 'different' type (int2 product_id column refers to an int8 column):

The requirements in recent SQL specs appears to be that the column types
are comparable, not the same.

SQL2003 11.8 <referential constraint definition>
"The declared type of each referencing column shall be comparable to the
declared type of the corresponding referenced column."

As far as I can tell the spec requires two numbers to be comparable, which
would make a failure for numeric or real an actual bug, but I don't have
an 8.3 system available at the moment to confirm against.

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

Предыдущее
От: craigp
Дата:
Сообщение: bug in 8.3? foreign key refers to different type
Следующее
От: Bruno Baguette
Дата:
Сообщение: How can I get the first and last date of a week, based on the week number and the year