FK type mismatches?

Поиск
Список
Период
Сортировка
От Neil Conway
Тема FK type mismatches?
Дата
Msg-id 1062691024.2233.10.camel@tokyo
обсуждение исходный текст
Ответы Re: FK type mismatches?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: FK type mismatches?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Should this produce a warning?

nconway=# create table a (b int4 unique);
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "a_b_key" for
table "a"
CREATE TABLE
nconway=# create table c (d int8 references a (b));
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
CREATE TABLE

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.

-Neil




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

Предыдущее
От: "Jenny -"
Дата:
Сообщение: tablelevel and rowlevel locks
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Seqscan in MAX(index_column)