From a858cc0a6ca4c6dc03ad3d7281a8f9ef7e88ed09 Mon Sep 17 00:00:00 2001 From: Austin Weisgrau Date: Fri, 20 Sep 2024 16:33:43 -0700 Subject: [PATCH] Don't lower-case table name to check if table exists Some tables have uppercase letters in their name --- parsons/databases/postgres/postgres_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parsons/databases/postgres/postgres_core.py b/parsons/databases/postgres/postgres_core.py index 080b35a4a9..b19c69890f 100644 --- a/parsons/databases/postgres/postgres_core.py +++ b/parsons/databases/postgres/postgres_core.py @@ -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