pg_query
pg_query copied to clipboard
[Feature] Use pg query to indent SQL
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
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).