Closed RomanHargrave closed 4 years ago
Thanks for reporting this. I pushed a fix for this, you can check it out.
Note however that the invalid syntax line is not detected where you point it out, but it will be detected at the "END" statement and the next "CREATE" statement. The aim of sql-indent
is not really to detect syntax errors in SQL code, and this error detection is very limited -- I have no plans to improve that, as it would be a lot of work.
Thanks! I'll take a look
Note however that the invalid syntax line is not detected where you point it out
Ah, sorry for the confusion there. I used this as an example to try and illustrate how I thought this was happening. The invalid syntax bit was just an acknowledgement that the CREATE ... END;
statement given wasn't something that would occur in the wild.
sql-indent-mode
appears to be confused by theIF NOT
clause that may appear in pgSQL'sCREATE EXTENSION
statement. See the following example -sql-product
is set topostgres
.