Re: To-Do item: skip table scan for adding column with provable check constraints
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: To-Do item: skip table scan for adding column with provable check constraints |
| Дата | |
| Msg-id | 20169.1464130592@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: To-Do item: skip table scan for adding column with provable check constraints (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)) |
| Ответы |
Re: To-Do item: skip table scan for adding column with
provable check constraints
|
| Список | pgsql-hackers |
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> ... and if the CHECK expression is immutable ...
> Doesn't it have to be already?
AFAIK we don't insist on that currently. You could imagine useful checks
that are not, for example CHECK(write_timestamp <= now()).
> Otherwise a value accepted at one point in time could suddenly violate
> the constraint later, even though it never changed.
True. If you use a non-immutable check, it's on your head whether or not
this is a problem. But the database shouldn't perform optimizations that
just assume it's immutable without checking.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера