Skip to content

Commit

Permalink
Don't lower-case table name to check if table exists
Browse files Browse the repository at this point in the history
Some tables have uppercase letters in their name
  • Loading branch information
austinweisgrau committed Sep 20, 2024
1 parent 71fdf0e commit a858cc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parsons/databases/postgres/postgres_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ def table_exists_with_connection(self, table_name, connection, view=True):
# Extract the table and schema from this. If no schema is detected then
# will default to the public schema.
try:
schema, table = table_name.lower().split(".", 1)
schema, table = table_name.split(".", 1)
except ValueError:
schema, table = "public", table_name.lower()
schema, table = "public", table_name

with self.cursor(connection) as cursor:
# Check in pg tables for the table
Expand Down

0 comments on commit a858cc0

Please sign in to comment.