Currently, we already implement to support generated columns on foreign table like postgres_fdw.
I would like to contribute them into repository and community.
If you have interest? I will create pull request for share this feature.
Summary modification:
get all updated columns in getUpdateTargetAttrs()
Reference testcase of postgres_fdw.sql in postgres_fdw:
create foreign table grem1 (
id int,
a int,
b int generated always as (a * 2) stored)
server mysql_svr options(dbname 'mysql_fdw_post', table_name 'gloc1');
insert into grem1 (a) values (1), (2);
update grem1 set a = 22 where a = 2;
select a, b from grem1;
a | b
----+----
1 | 2
22 | 44
(2 rows)
Currently, we already implement to support generated columns on foreign table like postgres_fdw. I would like to contribute them into repository and community. If you have interest? I will create pull request for share this feature.
Summary modification:
Reference testcase of postgres_fdw.sql in postgres_fdw: