darold / pgFormatter

A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/
PostgreSQL License
1.66k stars 100 forks source link

Detecting JSON operator as invalid #275

Closed vidocco closed 2 years ago

vidocco commented 2 years ago

Hi,

We currently have an sql file that contains the following bit of SQL:

CASE WHEN "something" ?| "someKey" THEN

When running pgFormatter through this file, it automatically changes ?| into ? | (which is not the same operator).

darold commented 2 years ago

Commit 343047e fixes this issue.

bbstilson commented 1 year ago

I'm encountering a similar issue with the #- operator. It might be best to add all the missing operators from the docs.

#-
-
||
?&
?|
?
<@
@>
#>>
#>
->>
->