vertical-blank / sql-formatter

SQL formatter written with only Java Standard Library, without dependencies.
MIT License
226 stars 47 forks source link

@@ operator splitting in Postgres #42

Closed kkarasev1 closed 3 years ago

kkarasev1 commented 3 years ago

The @@ operator is used in PostgreSQL for text search https://www.postgresql.org/docs/13/functions-textsearch.html However, the formatter obtained by SqlFormatter.of(Dialect.PostgreSql) splits those two @ symbols with space, making a query using that operator invalid.

kkarasev1 commented 3 years ago

This looks to be the same issue as #38 but for different operator - the same workaround works

vertical-blank commented 3 years ago

Fixed by #48