Re: Forcefully adding a CHECK constrained

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Forcefully adding a CHECK constrained
Дата
Msg-id 1338137168.29608.78.camel@jdavis
обсуждение исходный текст
Ответ на Forcefully adding a CHECK constrained  ("Catalin(ux) M. BOIE" <catab@embedromix.ro>)
Список pgsql-general
On Sat, 2012-05-26 at 22:06 +0300, Catalin(ux) M. Boie wrote:
> Hello.
> Thanks for the answer.
>
> I really want to avoid reading the whole table. It is too expensive,
> and with the proposed feature will be not needed. I think is much
> faster to forcefully add the check if you know the range of data.
>
> What do you think?

Why not just create the CHECK constraint as NOT VALID, and never
validate it? It will still enforce the constraint, it just won't
validate it against your old data, which sounds like what you want.

Regards,
    Jeff Davis


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

Предыдущее
От: "F. BROUARD / SQLpro"
Дата:
Сообщение: Re: PG vs MSSQL language comparison ?
Следующее
От: Marti Raudsepp
Дата:
Сообщение: Re: PG vs MSSQL language comparison ?