kaan-aytekin / concise-sql-formatter

A concise SQL formatter extension for VS Code.
MIT License
4 stars 1 forks source link

plpgsql support #2

Open onwardmk opened 1 month ago

onwardmk commented 1 month ago

Thank you for this extension. I prefer this one over any others I've used so far.

That said, I'm coming across an issue that's preventing me from using it for formatting procedural SQL. I'm trying to format the definition for a Postgresql procedure using the standard SQL dialect, and the formatter is splitting the characters in the delimiter like this:

CREATE
OR REPLACE PROCEDURE some_proc(p_some_param bigint) LANGUAGE plpgsql AS $ $ BEGIN

As a result, I'm getting an error due to the $ $ when I run the script.

It would also be nice if the formatter could indent nested blocks of code in the script (e.g., DO, BEGIN, IF). Currently, the formatter left aligns all the SQL, making it difficult to read.

onwardmk commented 3 weeks ago

Another thing I noticed is that the formatting is upper-casing table aliases in my queries. Since these aren't keywords, I would expect them to stay lowercased.