-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Psycopg placeholders #198
Comments
Thanks for the report, @snorkysnark! As it says in the README, we only support Can you use these placeholders in a |
Yes, they behave similarly in select statements Here's the relevant documentstion for psycopg2 and psycopg3: |
Thanks for the docs! I love how explicit they are on the format for these placeholders; should make lexing them quite straightforward. Any interest in contributing the fix for this? Shouldn't be too complicated. You can use this PR as a guide (it added support for The steps would be:
|
Describe the bug
sqlfmt breaks placeholders used by psycopg (python postgres driver), such as
%s
and%(name)s
To Reproduce
Format the following code:
Expected behavior
The placeholders should remain intact:
Actual behavior
sqlfmt inserts extra spaces:
Additional context
What is the output of
sqlfmt --version
?sqlfmt, version 0.9.0
The text was updated successfully, but these errors were encountered: