Re: generated columns
Serge Rielau <serge@rielau.com>
From: Serge Rielau <serge@rielau.com>
To: Jaime Casanova <jaime.casanova@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-09-12T21:26:40Z
Lists: pgsql-hackers
> On Sep 12, 2017, at 12:35 PM, Jaime Casanova <jaime.casanova@2ndquadrant.com> wrote: > > also is interesting that in triggers, both before and after, the > column has a null. that seems reasonable in a before trigger but not > in an after trigger Why is a NULL reasonable for before triggers? If I create a table with a column with default and I omit that column on INSERT Is the column value also NULL in the before trigger? (I hope not) BTW, the original idea behind generated columns was to materialize them. Reason being to avoid expensive computations of frequently used expressions (and to support indexing in the absence of indexes with expressions) You may find the following amusing: https://www.ibm.com/developerworks/community/blogs/SQLTips4DB2LUW/entry/expression_generated_columns?lang=en <https://www.ibm.com/developerworks/community/blogs/SQLTips4DB2LUW/entry/expression_generated_columns?lang=en> Cheers Serge Rielau salesforce.com
Commits
-
Generated columns
- fc22b6623b6b 12.0 landed
-
Add walreceiver API to get remote server version
- 69039fda837d 12.0 landed
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 cited
-
pg_restore: Augment documentation for -N option
- 2fe42baf7c1a 12.0 cited
-
Change delimiter used for display of NextXID
- 59a884e9854c 9.6.0 cited