EnterpriseDB / mysql_fdw

PostgreSQL foreign data wrapper for MySQL
Other
521 stars 160 forks source link

Support Truncate like postgres_fdw of postgresql-14 #242

Open MinhLA1410 opened 2 years ago

MinhLA1410 commented 2 years ago

Currently, we already implement Truncate like postgres_fdw from postgresql-14. 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:

-- Before
ALTER SERVER mysql_svr OPTIONS (ADD truncatable 'false');
TRUNCATE tru_ftable;            -- error
ERROR:  foreign table "tru_ftable" does not allow truncates

-- After
ALTER FOREIGN TABLE tru_ftable OPTIONS (ADD truncatable 'true');
TRUNCATE tru_ftable;
surajkharage19 commented 1 year ago

Thanks.

We have added the truncate 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?