Re: FK type mismatches?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FK type mismatches?
Дата
Msg-id 7346.1062742480@sss.pgh.pa.us
обсуждение исходный текст
Ответ на FK type mismatches?  (Neil Conway <neilc@samurai.com>)
Ответы Re: FK type mismatches?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> Should this produce a warning?
> [ foreign-key reference to column of a different datatype ]
> Aside from the logical inconsistency, it will also lead to poor
> performance since the type mismatch will prevent index scans. I've
> noticed a couple people have reported performance issues due to making
> this kind of mistake.

There was some discussion of this a couple weeks back, but I don't recall
any clear consensus emerging.  I'm for it myself though.

If we follow Peter's recently proposed guideline, this would have to be
a NOTICE not a WARNING, because the command absolutely is doing what you
told it to do.  Peter, does that make you uncomfortable?  It's not
exactly the answer I would've wanted.  In this context it seems like we
want WARNING to mean "we'll do what you told us to do, but are you really
*sure* it is what you want?"
        regards, tom lane


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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Seqscan in MAX(index_column)
Следующее
От: "Shridhar Daithankar"
Дата:
Сообщение: Re: Prelimiary DBT-2 Test results