sqlparse
sqlparse copied to clipboard
Multi-character operators containing @, * are treated indivdually
SELECT ARRAY[1] <@ ARRAY[1, 2], 'a' !~* 'xyz'
When above sql is formatted using sqlparse.format(use_space_around_operators=true), out put is -
SELECT ARRAY[1] < @ ARRAY[1, 2], 'a' !~ * 'xyz'
Spaces are added between '<' and '@' & '~' and '*'.
Probable fix would be allowing another parameter to sqlparse.format() which allows to pass explicit list of operators.
Please don't tamper with white spaces between operator characters mentioned here in the PostgreSQL documentation.
Any update on this ? Waiting for the fix.