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

ExecProcessReturning is unexpectedly called twice for psql request ca… #490

Conversation

hopebo
Copy link
Contributor

@hopebo hopebo commented Dec 4, 2024

Description

In community postgresql, ExecProcessReturning is called once after the main process of ExecInsert. But due to some merging errors related to Babelfish and T-SQL, this function is wrongly called twice for psql requests. At the first call, the xmax is not initialized causing unexpected error raising.

The first intention of these pieces of codes is to call it in the first place only for T-SQL(CR-52326143). And then got wrongly cherry-picked in CR-57250041. Finally, the condition check gets removed in CR-65026879. We should keep the first intention of the codes, which also makes it consistent with the behaviour in ExecUpdate.

Task: BABEL-5343

Cherry-picked from #488

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…using overflow error

Description
-----------
In community postgresql, ExecProcessReturning is called once after the
main process of ExecInsert. But due to some merging errors related to
Babelfish and T-SQL, this function is wrongly called twice for psql
requests. At the first call, the xmax is not initialized causing
unexpected error raising.

The first intention of these pieces of codes is to call it in the
first place only for T-SQL(CR-52326143). And then got wrongly
cherry-picked in CR-57250041. Finally, the condition check gets
removed in CR-65026879. We should keep the first intention of the
codes, which also makes it consistent with the behaviour in
ExecUpdate.

Task: BABEL-5343
Signed-off-by: Bo Li <[email protected]>
@hopebo hopebo requested a review from 2jungkook December 4, 2024 18:12
@2jungkook 2jungkook merged commit 7a411ef into babelfish-for-postgresql:BABEL_4_X_DEV__PG_16_X Dec 4, 2024
2 checks passed
@2jungkook 2jungkook deleted the jira-babel-5343-16 branch December 4, 2024 22:57
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.

2 participants