Re: [HACKERS] generated columns

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [HACKERS] generated columns
Дата
Msg-id CANP8+jJVK82tHfzHKz7w7oN_q1T1gPFMW+13LY4RuytfTr=3+g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] generated columns  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Tue, 6 Nov 2018 at 13:16, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
 
> Stored generated columns should be treated just like we'd treat a column
> value added by a trigger.
>
> e.g. if we had a Timestamp column called LastUpdateTimestamp we would
> want to send that value

Generated columns cannot have volatile expression results in them, so
this case cannot happen.

Also, we don't know whether the generation expression on the target is
the same (or even if it looks the same, consider locale issues etc.), so
we need to recompute the generated columns on the target anyway, so it's
pointless to send the already computed stored values.

Makes sense. 

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: backend crash on DELETE, reproducible locally
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: First-draft release notes for back-branch releases