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
Add support for PostgreSQL returning #3962
Comments
You need to upgrade your version of PostgreSQL to 15 or newer and use the standard |
@katzyn Thank you for your answer. I am reading now about Could you explain your idea? |
Sorry, I thought about The SQL Standard has more powerful data change delta tables for a long time and H2 supports them well enough: So you should ask developers of PostgreSQL about this standard feature, they definitely have more resources than us. |
For now, you can use To use this method you need to pass |
Here they say that posgresql returning is equivalent of data_change_delta_table. So, what should I do with this issue? I don't think that psql will support data_change_delta_table as they have their own solution. Should H2 support their non standard solution in PostgreSQL mode? @katzyn What will you say? Should this issue be closed or not? |
This feature request doesn't need to be closed, but if bugtracker of PostgreSQL doesn't have a feature request about the standard syntax, such feature request needs to be created, it is more reasonable to implement standard features everywhere. Vendor-specific features are hard to implement (because their documentation of database systems usually doesn't describe an expected behavior in various special cases) and their usage only makes your SQL less portable across various database engines. |
@katzyn I created "issue" in PostgreSQL mailing list - see https://www.postgresql.org/message-id/b85900eb-9e3c-e358-aa8f-5a27b30c17e7%40gmail.com . Let's see what they will say. |
@katzyn I got answer in another postgresql mailing list. See https://www.postgresql.org/message-id/flat/4f12dcdb-6d17-22a9-14e7-c006c97f5fab%40gmail.com |
It is a very often situation when it is necessary to get some information after INSERT/UPDATE queries. Postgresql supports it via
returning
. At the same time H2 in PostgreSQL mode doesn't support it.So, I suggest to add such support so it could be possible to test
returning
using H2.The text was updated successfully, but these errors were encountered: