Re: Behavior of GENERATED columns per SQL2003 - Mailing list pgsql-hackers

From Richard Huxton
Subject Re: Behavior of GENERATED columns per SQL2003
Date
Msg-id 46441C28.6000003@archonet.com
Whole thread Raw
In response to Re: Behavior of GENERATED columns per SQL2003  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Simon Riggs" <simon@2ndquadrant.com> writes:
>> On Thu, 2007-05-10 at 10:11 -0400, Tom Lane wrote:
>>> As for GENERATED ALWAYS AS (expr), now that we understand that it's not
>>> supposed to define a virtual column, what's the point?
> 
>> We do need virtual columns, whether the spec requires them or not.
> 
> Agreed, they seem more useful than what the spec's got in mind.  You can
> fake a virtual column using a view, but it's a whole lot more painful
> than faking a GENERATED column using a trigger (at least if you wish the
> view to be updatable).

If they could play a part in foreign keys that would be useful too.

--   Richard Huxton  Archonet Ltd


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Behavior of GENERATED columns per SQL2003
Next
From: Magnus Hagander
Date:
Subject: Re: [pgsql-es-ayuda] Error SSL en Postgresql