Fix: return NoData for Describe (Portal) before Execute on empty statement#5143
Conversation
query) Now the server returns the expected NoData response in this case, consistent with protocol behavior.
Summary of ChangesHello @rahim-kanji, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a specific edge case in the PostgreSQL extended query protocol where Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly fixes an issue where Describe (Portal) on an empty statement did not return a NoData response. The logic change in PgSQL_Connection.cpp is sound, and the accompanying tests in pgsql-extended_query_protocol_test-t.cpp effectively verify the fix and a control case. My review includes a minor suggestion to improve code readability in the fix, and points out a few copy-paste errors in the new tests, such as a redundant check and an incorrect error message.
2a610f9 to
cd2640f
Compare
|



Summary
Fixes an issue where
Describe (Portal)does not return aNoDataresponse when sent beforeExecuteif the prepared statement was created with an empty query string.Details
Parse (empty statement) -> Bind -> Describe (Portal) -> Execute.Describe (Portal)returned nothing if called beforeExecute.NoDataresponse in this case, making behavior consistent with protocol expectations.