[8.x] Re-add update from support for PostgreSQL #39151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR re-introduces "update ... from ..." support for the PostgreSQL grammar. Since there wasn't a good option or straight way to re-implement the behavior after the refactor in #29393 I opted to add a new dedicated
updateFrom
method specifically for the PostgreSQL grammar.This implementation is a bit cumbersome and crude as people will need to specifically use
updateFrom
instead ofupdate
if they want the correct behavior. Ideally this would be done automatically.I've tested this with the queries from #33265 and got them back working with this. I also re-added the original tests that were removed.
Before merging this I'd like to:
If we get feedback from someone who can think of a better way to solve this then gladly. Otherwise I think this is the only solution for the problem at hand.
Fixes #33265