Re: Foreign key data type mismatches

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: Foreign key data type mismatches
Дата
Msg-id 3FCB36C5.4070000@pse-consulting.de
обсуждение исходный текст
Ответ на Foreign key data type mismatches  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Foreign key data type mismatches  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Peter Eisentraut wrote:

>I was just annoyed to find out that a foreign key doesn't check whether
>the referenced column has a sufficiently similar data type, it only checks
>whether an = operator exists.  This masks schema design errors and typos.
>Should this be tightened up, for example using the castability
>characteristics between the two data types?
>  
>

Sounds like a good idea. IMHO normally only *equal* data types should be 
referenced in a good data model design, but there's probably the need 
for some relaxed check option too.

Regards,
Andreas




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Foreign key data type mismatches
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Where does catalog store CHAR length ?