pg_query icon indicating copy to clipboard operation
pg_query copied to clipboard

[Feature] Use pg query to indent SQL

Open bogdan opened this issue 1 year ago • 1 comments

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

bogdan avatar Mar 06 '24 09:03 bogdan

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).

lfittl avatar Mar 07 '24 01:03 lfittl