BUG #11554: Enforce that number and type of both columns involved in fkey are same type

Поиск
Список
Период
Сортировка
От gary.weaver@protolabs.com
Тема BUG #11554: Enforce that number and type of both columns involved in fkey are same type
Дата
Msg-id 20141002155521.2543.72522@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #11554: Enforce that number and type of both columns involved in fkey are same type
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11554
Logged by:          Gary Weaver
Email address:      gary.weaver@protolabs.com
PostgreSQL version: 9.3.2
Operating system:   Linux
Description:

To help adhere to the statement, "Of course, the number and type of the
constrained columns need to match the number and type of the referenced
columns." as noted in
http://www.postgresql.org/docs/9.3/static/ddl-constraints.html shouldn't PG
enforce that both columns involved in a foreign key constraint are of the
same number and type (e.g. int != bigint) at time of constraint creation?

And possibly the default for enforcement could be configured to be off, if
this were released in a 9.x release and then defaulted to on for 10.x+
releases of PG, if this is considered desirable.

The problem is that if you are forced to use a tool that syncs data between
databases of different types, other databases sometimes enforce that the
types cannot be different. While this is not a frequent use case, it just
makes sense in most cases that you'd want the two column types/sizes to be
the same.

Thanks for your help!

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #11477: psql -L no stderr
Следующее
От: John R Pierce
Дата:
Сообщение: Re: BUG #11553: Sum function does not exist in Create View