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

Fix the order of parameters listed by DESCRIBE INPUT #15086

Closed
wants to merge 2 commits into from

Conversation

kasiafi
Copy link
Member

@kasiafi kasiafi commented Nov 17, 2022

Before this change, if a prepared query contained a CTE,
the parameters from the CTE were listed last by DESCRIBE
INPUT, preceded by all parameters from the enclosing query.
It was incorrect, since CTE is first in the query text.

This fix changes the order in which the CTE and the enclosing
query body are visited in the AST builder, thus changing the
order of parameters in the DESCRIBE INPUT result.

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# General
* Fix the order of parameters listed by DESCRIBE INPUT for certain prepared queries containing a WITH clause.

Before this change, if a prepared query contained a CTE,
the parameters from the CTE were listed last by DESCRIBE
INPUT, preceded by all parameters from the enclosing query.
It was incorrect, since CTE is first in the query text.

This fix changes the order in which the CTE and the enclosing
query body are visited in the AST builder, thus changing the
order of parameters in the DESCRIBE INPUT result.
@cla-bot cla-bot bot added the cla-signed label Nov 17, 2022
@martint
Copy link
Member

martint commented Nov 17, 2022

How does it relate to #14914 ?

@kasiafi
Copy link
Member Author

kasiafi commented Nov 17, 2022

How does it relate to #14914 ?

Oh, I missed that PR, and the issue. I was addressing the same problem. My approach was easier and less general though.
Closing this PR.

@kasiafi kasiafi closed this Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants