Re: CHECK Constraint Deferrable

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: CHECK Constraint Deferrable
Дата
Msg-id CAKFQuwYYh+S9sK4tW+sZP4Ky9OivBcayJJGSE-dXEr08ww7v7g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CHECK Constraint Deferrable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Oct 2, 2023 at 12:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com> writes:
> V3 patch attached.

Sorry for not weighing in on this before, but ... is this a feature
we want at all?  We are very clear in the existing docs that CHECK
conditions must be immutable [1], and that's not something we can
easily relax because if they are not then it's unclear when we need
to recheck them to ensure they stay satisfied.

Agreed.  I'm not sold on conforming to the standard being an appropriate ideal here.  Either we already don't because our check constraints are immutable, or I'm missing what use case the committee had in mind when they designed this feature.  In any case, its absence doesn't seem that sorely missed, and the OP's only actual example would require relaxing the immutable property which I disagree with.  We have deferrable triggers to serve that posited use case.

David J.

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: pg16: XX000: could not find pathkey item to sort
Следующее
От: "Karl O. Pinc"
Дата:
Сообщение: Re: Various small doc improvements; plpgsql, schemas, permissions, oidvector