Skip to content

Commit

Permalink
Allow psql \d
Browse files Browse the repository at this point in the history
  • Loading branch information
lhofhansl committed Sep 13, 2024
1 parent 37ed325 commit d7ba44d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buenavista/backends/duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ def rewrite_sql(self, sql: str) -> str:
return sql.replace("pg_catalog.current_schemas", "current_schemas")
elif "pg_catalog.generate_series" in sql:
return sql.replace("pg_catalog.generate_series", "generate_series")
elif "pg_catalog.PG_GET_USERBYID" in sql:
# allow psql's \d to work
# just display the owner's oid
return sql.replace("pg_catalog.PG_GET_USERBYID", "")
return sql

def in_transaction(self) -> bool:
Expand Down

0 comments on commit d7ba44d

Please sign in to comment.