You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL has a few aliases for the LIKE keyword (9.7.1. LIKE). sqlfmt adds a space between the ~~ operator, breaking the query.
Other operators specific to PostgreSQL (from the docs)
The operator ~~ is equivalent to LIKE, and ~~* corresponds to ILIKE. There are also !~~ and !~~* operators that represent NOT LIKE and NOT ILIKE, respectively. All of these operators are PostgreSQL-specific.
To Reproduce
Steps to reproduce the behavior. If this is a formatting issue, include the input code here.
Input
with test as (select'test'as test) select*from test where test ~~ 'test'
sqlfmt output
with test as (select'test'as test) select*from test where test ~ ~ 'test'
Expected behavior
No spaces are added to the ~~ operator
Additional context
What is the output of sqlfmt --version?
$ sqlfmt --version
sqlfmt, version 0.21.2
The text was updated successfully, but these errors were encountered:
Describe the bug
PostgreSQL has a few aliases for the
LIKE
keyword (9.7.1. LIKE). sqlfmt adds a space between the~~
operator, breaking the query.Other operators specific to PostgreSQL (from the docs)
To Reproduce
Steps to reproduce the behavior. If this is a formatting issue, include the input code here.
Input
sqlfmt output
Expected behavior
No spaces are added to the
~~
operatorAdditional context
What is the output of
sqlfmt --version
?The text was updated successfully, but these errors were encountered: