Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support RETURNING on mariadb > 10.5 #258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wpichler
Copy link

Hi all,

MariaDB > 10.5 does support RETURNING now.

https://mariadb.com/kb/en/insertreturning/

I'd like to add this feature to mysql_fdw - but without knowing the fdw sources / postgres internals it is hard to handle.

This is Work in Progress - maybe someone has already done this - also working on it ?

Currently i do get a cache lookup error on the columns translate - i think i am using it not correct.

@surajkharage19
Copy link

Thanks for the pull request.

As you mentioned above, RETURNING clause might be working in MariaDB >10.5 but not in MySQL. So the changes will be complicated even if we try to implement only for MariaDB as mysql_fdw supports both. Currently, this is not on our roadmap but if you have a working patch ready for the same, we will be happy to review and take it further. From the pull request that you submitted, I can see code changes but I don't think those are considered for MySQL as well.

@wpichler
Copy link
Author

The current PR is just a starting point - far from complete. For the real implementation i would implement a query to get the server type (mysql / mariadb) and version. And depending on the version the returning is then available or not.

@mkgrgis
Copy link

mkgrgis commented Feb 14, 2023

@wpichler , there is version functions and full RETURNING support in firebird_fdw. You can read the interesting realisation from @ibarwick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants