Re: [HACKERS] generated columns - Mailing list pgsql-hackers

From Nico Williams
Subject Re: [HACKERS] generated columns
Date
Msg-id 20171002152338.GH1251@localhost
Whole thread Raw
In response to [HACKERS] generated columns  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] generated columns
List pgsql-hackers
On Thu, Aug 31, 2017 at 12:16:43AM -0400, Peter Eisentraut wrote:
> In previous discussions, it has often been a source of confusion whether
> these generated columns are supposed to be computed on insert/update and
> stored, or computed when read.  The SQL standard is not explicit, but
> appears to lean toward stored.  DB2 stores.  Oracle computes on read.

Question: How would one know the difference between storing computed         columns vs. computing them on read?

Answer?:  Performance.  If the computation is slow, then you'll really         notice on read.

Nico
-- 


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [PATCH] Assert that the correct locks are held whencalling PageGetLSN()
Next
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files