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

[Feature] Use pg query to indent SQL #311

Open
bogdan opened this issue Mar 6, 2024 · 1 comment
Open

[Feature] Use pg query to indent SQL #311

bogdan opened this issue Mar 6, 2024 · 1 comment

Comments

@bogdan
Copy link

bogdan commented Mar 6, 2024

This might be ideal library to perform indentation of the SQL query as it is going to be always syntactically correct.

I propose some deparse options like indent

@lfittl
Copy link
Member

lfittl commented Mar 7, 2024

Hi @bogdan - The challenge we've had in the past is that everyone has different ideas on how SQL should be indented, so it wasn't clear whether this would be a good feature to have directly in pg_query. That said, maybe this is still useful to have, with potentially different styles that could be set.

If you'd like to contribute something that adds this, we'd need to add that in the libpg_query deparser (i.e. requires some C knowledge to add).

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

2 participants