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

From Erik Rijkers
Subject Re: [HACKERS] generated columns
Date
Msg-id e61c597ac4541b77750594eea73a774c@xs4all.nl
Whole thread Raw
In response to Re: [HACKERS] generated columns  (Erik Rijkers <er@xs4all.nl>)
Responses Re: [HACKERS] generated columns
List 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









pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Why does ExecComputeStoredGenerated() form a heap tuple
Next
From: Amit Langote
Date:
Subject: Re: speeding up planning with partitions