Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Дата
Msg-id 1322256419-sup-7794@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID  (Jaime Casanova <jaime@2ndquadrant.com>)
Список pgsql-hackers
Excerpts from Dean Rasheed's message of vie nov 25 13:45:34 -0300 2011:

> Looking back at Thom's original example, it seems odd to allow this
> syntax at all:
>
> CREATE TABLE a (
>    num integer,
>    CONSTRAINT meow CHECK ((num < 20)) NOT VALID
> );
>
> It's not documented, but is currently allowed. However, since all data
> subsequently added to the table is checked against the constraint, the
> constraint is guaranteed to be valid, so there seems to be no point in
> allowing it to be declared NOT VALID.

Hah ... interesting.  Not sure it's worth fussing about this.  If the
user shoots himself in the foot by declaring an unvalidated constraint,
which is not even documented, are we really at fault?

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


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Inserting heap tuples in bulk in COPY