pgsql: Disallow NULLS NOT DISTINCT indexes for primary keys

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Disallow NULLS NOT DISTINCT indexes for primary keys
Дата
Msg-id E1pVVDc-000STi-BN@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Disallow NULLS NOT DISTINCT indexes for primary keys

A unique index which is created with non-distinct NULLS cannot be
used for backing a primary key constraint.  Make sure to disallow
such table alterations and teach pg_dump to drop the non-distinct
NULLS clause on indexes where this has been set.

Bug: 17720
Reported-by: Reiner Peterke <zedaardv@drizzle.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/17720-dab8ee0fa85d316d@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d9595232579a3a9fadf4ce0b4cd58c1a3fc3b2f7

Modified Files
--------------
src/backend/catalog/index.c                | 13 +++++++++++++
src/bin/pg_dump/pg_dump.c                  |  7 ++++++-
src/test/regress/expected/create_index.out |  6 ++++++
src/test/regress/sql/create_index.sql      |  6 ++++++
4 files changed, 31 insertions(+), 1 deletion(-)


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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: pg_dump: Remove move "blob" terminology
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix comment indentation and whitespace