Skip to content

Commit

Permalink
Merge pull request #36 from lhofhansl/psql
Browse files Browse the repository at this point in the history
Allow psql \d
  • Loading branch information
jwills authored Sep 16, 2024
2 parents 4df2023 + d7ba44d commit f473533
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 @@ -177,6 +177,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 f473533

Please sign in to comment.