pgsql: Reject duplicate column names in foreign key referenced-columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Reject duplicate column names in foreign key referenced-columns
Дата
Msg-id E1XGAji-0005F3-Mz@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Reject duplicate column names in foreign key referenced-columns lists.

Such cases are disallowed by the SQL spec, and even if we wanted to allow
them, the semantics seem ambiguous: how should the FK columns be matched up
with the columns of a unique index?  (The matching could be significant in
the presence of opclasses with different notions of equality, so this issue
isn't just academic.)  However, our code did not previously reject such
cases, but instead would either fail to match to any unique index, or
generate a bizarre opclass-lookup error because of sloppy thinking in the
index-matching code.

David Rowley

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4ff49746eab2096090be8cd4434c9a5745ae32a4

Modified Files
--------------
src/backend/commands/tablecmds.c |   51 ++++++++++++++++++++++----------------
1 file changed, 29 insertions(+), 22 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Reject duplicate column names in foreign key referenced-columns
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Reject duplicate column names in foreign key referenced-columns