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
Дата
Msg-id d8jshx7nm16.fsf@dalvik.ping.uio.no
обсуждение исходный текст
Ответ на Re: To-Do item: skip table scan for adding column with provable check constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: To-Do item: skip table scan for adding column with provable check constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Robert Haas <robertmhaas@gmail.com> writes:
>> Right.  If there were a DEFAULT on the new column that would of course
>> be different, and you can also do thinks like CHECK (a != b) here.
>> However, if the CHECK constraint does not reference any column other
>> than the newly-added one, and if the new column will have the same
>> value for every row either because there is no default or because the
>> default is a constant,
>
> ... and if the CHECK expression is immutable ...

Doesn't it have to be already?  Otherwise a value accepted at one point
in time could suddenly violate the constraint later, even though it
never changed.


ilmari

-- 
"A disappointingly low fraction of the human race is,at any given time, on fire." - Stig Sandbeck Mathisen



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Speaking of breaking compatibility...standard_conforming_strings
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Allow COPY to use parameters