Skip to content

Commit

Permalink
Merge pull request #2129 from isosphere/develop
Browse files Browse the repository at this point in the history
[postgresql] quote schema and table name
  • Loading branch information
anjakefala authored Nov 20, 2023
2 parents 0e1afd8 + 216bb5a commit 81af233
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/loaders/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ class PgTable(Sheet):
@asyncthread
def reload(self):
if self.options.postgres_schema:
source = f"{self.options.postgres_schema}.{self.source}"
source = f'"{self.options.postgres_schema}"."{self.source}"'
else:
source = self.source
source = f'"{self.source}"'
with self.sql.cur(f"SELECT * FROM {source}") as cur:
self.rows = []
r = cur.fetchone()
Expand Down

0 comments on commit 81af233

Please # to comment.