"Simon Riggs" <[EMAIL PROTECTED]> 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).

> ISTM that we should interpret this as a requirement for a virtual
> column. We can always move from that to a stored column if the spec
> becomes more specific, though it would be harder to move the other way.

If you're suggesting commandeering the spec's GENERATED ALWAYS syntax
to represent virtual columns, when the committee has made it clear that
that's not what they intend, I say that's sheer folly.  What will you do
when they tweak the spec to the point where a virtual column clearly
doesn't satisfy it?  If we want a nonstandard feature we should use a
nonstandard syntax for it.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to