Re: [HACKERS] generated columns

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Erik Rijkers <er@xs4all.nl>, Sergei Kornilov <sk@zsrv.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Michael Paquier <michael.paquier@gmail.com>, Jaime Casanova <jaime.casanova@2ndquadrant.com>
Date: 2018-11-06T22:17:10Z
Lists: 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/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Generated columns

  2. Add walreceiver API to get remote server version

  3. Add pg_partition_tree to display information about partitions

  4. pg_restore: Augment documentation for -N option

  5. Change delimiter used for display of NextXID