ALTER TYPE 1: recheck index-based constraints

Поиск
Список
Период
Сортировка
От Noah Misch
Тема ALTER TYPE 1: recheck index-based constraints
Дата
Msg-id 20110109220023.GB5777@tornado.leadboat.com
обсуждение исходный текст
Ответы Re: ALTER TYPE 1: recheck index-based constraints  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
When ALTER TABLE rewrites a table, it reindexes, but the reindex does not
revalidate UNIQUE/EXCLUDE constraints.  This behaves badly in cases like this,
neglecting to throw an error on the new UNIQUE violation:

CREATE TABLE t (c numeric UNIQUE);
INSERT INTO t VALUES (1.1),(1.2);
ALTER TABLE t ALTER c TYPE int;

The comment gave a reason for skipping the checks: it would cause deadlocks when
we rewrite a system catalog.  So, this patch changes things to only skip the
check for system catalogs.

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: ALTER TYPE 0: Introduction; test cases
Следующее
От: Noah Misch
Дата:
Сообщение: ALTER TYPE 2: skip already-provable no-work rewrites