Re: creating CHECK constraints as NOT VALID

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: creating CHECK constraints as NOT VALID
Дата
Msg-id 1308171012-sup-4753@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: creating CHECK constraints as NOT VALID  (Jaime Casanova <jaime@2ndquadrant.com>)
Ответы Re: creating CHECK constraints as NOT VALID  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Excerpts from Jaime Casanova's message of mié jun 15 02:09:15 -0400 2011:

> psql \h says (among other things) for ALTER TABLE
> """
>    ADD table_constraint
>    ADD table_constraint_using_index
>    ADD table_constraint [ NOT VALID ]
> """
>
> ADD table_constraint appears twice and isn't true that all
> table_constraint accept the NOT VALID syntax... maybe we can accpet
> the syntax and send an unimplemented feature message for the other
> table_constraints?
>
> attached, is a script with the examples i have tried:
>
> EXAMPLE 1:
> constraint_exclusion when using NOT VALID check constraints... and it
> works well, except when the constraint has been validated, it keeps
> ignoring it (which means i won't benefit from constraint_exclusion)
> until i execute ANALYZE on the table or close connection

Here's an updated patch fixing all of the above.  I stole your first
test case and added it to regression, after some editorialization.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Why polecat and colugos are failing to build back branches
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: FK NOT VALID can't be deferrable?