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

Returning generated SQL #3580

Open
gc-ft opened this issue Jun 11, 2024 · 2 comments
Open

Returning generated SQL #3580

gc-ft opened this issue Jun 11, 2024 · 2 comments
Labels
idea Needs of discussion to become an enhancement, not ready for implementation

Comments

@gc-ft
Copy link

gc-ft commented Jun 11, 2024

In issue #2354 it is discussed multiple times that displaying the generated SQL might be interesting too. It seems like this feature was in the end not implemented.

I unterstand that there are other ways to retrieve the SQL query (for example through logs and using EXPLAIN VERBOSE to get the query ID to make sure to find it easily...

However, any explain plan returned through the plan accept header implemented is always going to be easier to understand, judge and also act upon with the SQL query present in the same data without having to implement extra steps which enable logging queries. It seems a lot more efficient to have the option to just return the SQL query right before the plan in the same reply?

I understand security considerations need to be taken, but this could be implemented via an extra config as db-allow-generated-sql or db-allow-plan-sql if it is only usable in combination with plan.

@wolfgangwalther wolfgangwalther added the idea Needs of discussion to become an enhancement, not ready for implementation label Jun 11, 2024
@ggam
Copy link

ggam commented Jun 11, 2024

Big +1 on this. It would be very useful for debugging purposes.

@YonatanHanan
Copy link

would really help out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Needs of discussion to become an enhancement, not ready for implementation
Development

No branches or pull requests

4 participants