Skip to content
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

fix bad f-string placement on describe_one_table_details #150

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Upcoming
========

Bug fixes:
----------
* Fix `\d` when used with a pattern

2.1.1 (2023-10-29)
==================

Expand Down
4 changes: 2 additions & 2 deletions pgspecial/dbcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,8 @@ def describe_one_table_details(cur, schema_name, relation_name, oid, verbose):
if tableinfo.relkind == "i" or tableinfo.relkind == "I":
if cur.connection.info.server_version >= 110000:
sql += (
f",\n CASE WHEN a.attnum <= (SELECT i.indnkeyatts FROM pg_catalog.pg_index i "
"WHERE i.indexrelid = '{oid}') THEN 'yes' ELSE 'no' END AS is_key"
",\n CASE WHEN a.attnum <= (SELECT i.indnkeyatts FROM pg_catalog.pg_index i "
f"WHERE i.indexrelid = '{oid}') THEN 'yes' ELSE 'no' END AS is_key"
)
att_cols["indexkey"] = cols
cols += 1
Expand Down
Loading