Open khieuvm opened 2 years ago
Thanks.
We have added the import_generated option support in mysql_fdw after your request. Can you please check if that is useful for you and share your feedback? If you are happy with the latest addition, then can you please close the case from your end?
About import_generated option:
Original behavior of postgres_fdw: get the "attgenerated" information from pg_attribute of remote server. If attgenerated is not NULL, postgres_fdw creates a foreign table with generated column option and set attdefault as generate expression. Please refer to: PostgreSQL document
Updated behavior of mysql_fdw: MySQL server provides EXTRA and GENERATION_EXPRESSION of INFORMATION_SCHEMA.COLUMNS table. If EXTRA content matches with "STORED GENERATED", mysql_fdw creates a foreign table with generated column option and set GENERATION_EXPRESSION as generate expression. Please refer to: MySQL document
So currently, we have already implemented this option in mysql_fdw. I would like to contribute them to the repository and community. I will create a pull request to share this feature if you have any interest.