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

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Дата
Msg-id CAEZATCXRAVDat1-0pVDcr=9tx55LZMm5zsLZt=BcKX85J=90eg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы 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  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On 24 November 2011 21:50, Alvaro Herrera <alvherre@commandprompt.com> wrote:
>
> Excerpts from Alvaro Herrera's message of vie nov 11 00:32:33 -0300 2011:
>> Excerpts from Thom Brown's message of jue nov 10 21:28:06 -0300 2011:
>> >
>> > On 10 November 2011 23:56, Thom Brown <thom@linux.com> wrote:
>>
>> > > The dump correctly contains:
>> > >
>> > > CREATE TABLE a (
>> > >    num integer,
>> > >    CONSTRAINT meow CHECK ((num < 20)) NOT VALID
>> > > );
>> >
>> > Actually I mean incorrectly contains, because the constraint needs
>> > adding after the data insertion, not as part of the create table
>> > statement.
>>
>> Interesting, thanks -- I'll look into it.
>
> I have just pushed a fix for this.  Thanks for the report and sorry for
> the delay.
>

There is a similar problem with NOT VALID check constraints on
domains. These are still being dumped as part of the CREATE DOMAIN
statement, which is invalid syntax, so they need to be dumped
separately from the domain creation, and presumably also after any
data for tables that use them.

Regards,
Dean


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: proposal: use errcontext for custom exception too
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Displaying accumulated autovacuum cost