Re: [HACKERS] generated columns
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Erik Rijkers <er@xs4all.nl>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Sergei Kornilov <sk@zsrv.org>,
Michael Paquier <michael.paquier@gmail.com>,
Jaime Casanova <jaime.casanova@2ndquadrant.com>
Date: 2019-04-04T09:42:13Z
Lists: pgsql-hackers
On 2019/04/04 16:52, Peter Eisentraut wrote:
> On 2019-04-02 20:54, Erik Rijkers wrote:
>> attached is run_ft.sh which creates a text file: /tmp/pg_head.txt
>> then sets it up as a foreign table, and adds a generated column.
>>
>> Then selects a succesful select, followed by a error-producing select.
>
> I have committed a fix for this.
+-- generated column tests
+CREATE FOREIGN TABLE gft1 (a int, b text, c text GENERATED ALWAYS AS
('foo') STORED) SERVER file_server
+OPTIONS (format 'csv', filename '@abs_srcdir@/data/list1.csv', delimiter
',');
+SELECT a, c FROM gft1;
+ a | c
+---+--------
+ 1 | _null_
+ 1 | _null_
Hmm, I'm afraid we might get bug reports if we go with this. Why is it OK
to get null in this case when a user explicitly asked for 'foo'?
Thanks,
Amit
Commits
-
Generated columns
- fc22b6623b6b 12.0 landed
-
Add walreceiver API to get remote server version
- 69039fda837d 12.0 landed
-
Add pg_partition_tree to display information about partitions
- d5eec4eefde7 12.0 cited
-
pg_restore: Augment documentation for -N option
- 2fe42baf7c1a 12.0 cited
-
Change delimiter used for display of NextXID
- 59a884e9854c 9.6.0 cited