tconbeer/sqlfmt

parsing error for postgress set

Closed this issue · 3 comments

Describe the bug
when a set statement is used the parser crashes

To Reproduce
try formatting a file that starts like`

\set ON_ERROR_STOP true

Expected behavior
it should format or ignore it

Actual behavior
it has crashes

Additional context
What is the output of sqlfmt --version?

sqlfmt, version 0.21.2

This makes sqlfmt unusable as a pre commit hook

set is a SQL command, but \set is not -- are you trying to sqlfmt a psql script?

Yes it is a psql script.

I would say works as intended, then?