Re: [HACKERS] generated columns

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Sergei Kornilov <sk(at)zsrv(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>
Subject: Re: [HACKERS] generated columns
Date: 2019-03-31 03:49:04
Message-ID: e61c597ac4541b77750594eea73a774c@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-01-16 22:40, Erik Rijkers wrote:
>
> If you add a generated column to a file_fdw foreign table, it works OK
> wih VIRTUAL (the default) but with STORED it adds an empty column,
> silently. I would say it would make more sense to get an error.

VIRTUAL is gone, but that other issue is still there: STORED in a
file_fdw foreign table still silently creates the column which then
turns out to be useless on SELECT, with an error like:

"ERROR: column some_column_name is a generated column
DETAIL: Generated columns cannot be used in COPY."

Maybe it'd be possible to get an error earlier, i.e., while trying to
create such a useless column?

thanks,

Erik Rijkers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-03-31 05:40:46 Re: speeding up planning with partitions
Previous Message Andres Freund 2019-03-31 03:00:33 Re: Why does ExecComputeStoredGenerated() form a heap tuple