PostgreSQL formatting of extensions is broken
Closed this issue · 2 comments
oleorhagen commented
Describe the bug
A clear and concise description of what the bug is.
Using the single line example:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Run sqlfmt
on it, and get:
CREATE EXTENSION IF NOT EXISTS uuid-ossp;
Run sqlfmt
again, and it now errors.
To Reproduce
More succintly:
cat 001_init.sql
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
cat 001_init.sql | sqlfmt
CREATE EXTENSION IF NOT EXISTS uuid-ossp;
cat 001_init.sql | sqlfmt | sqlfmt
at or near "-": syntax error
Expected behavior
I expect the formatting to be idempotent, and not format it to something which the tool itself thinks is invalid.
Actual behavior
See above.
Additional context
sqlfmt --version
sqlfmt 0.5.0
Tool is installed as an arch-linux package.
tconbeer commented
You're using the wrong package. You install this one with
pip install shandy-sqlfmt
oleorhagen commented
You're using the wrong package. You install this one with
pip install shandy-sqlfmt
Oh my, I apologize. Old outdated arch linux package tripped me up. 🙏