Skip to content

sqlcommenter: put the comment at the beginning of the query #3583

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

Open
jakub-mikians-airspace-intelligence opened this issue Jun 13, 2025 · 0 comments

Comments

@jakub-mikians-airspace-intelligence

Hi!

sqlcommenter appends the comment to the end of the query. I would propose prepending the comment at the beginning of the query instead.

The comment at the end is problematic when the query is really long, and the comment is truncated from database query logs. The very long queries are often produced by Django, and the query logs (e.g. top slow queries) have limited length in AWS RDS.

What do you think?

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

No branches or pull requests

1 participant