From dffb2c2494299286fd3d3a2c0c08318f5307bd8a Mon Sep 17 00:00:00 2001 From: Austin Weisgrau Date: Sun, 6 Oct 2024 14:27:38 -0700 Subject: [PATCH] postgres escape column name in updated_at_rows query This is necessary if, for example, the column name is not all lowercase --- parsons/databases/postgres/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsons/databases/postgres/postgres.py b/parsons/databases/postgres/postgres.py index e92d6f55c..18c2a6113 100644 --- a/parsons/databases/postgres/postgres.py +++ b/parsons/databases/postgres/postgres.py @@ -129,7 +129,7 @@ def get_updated_rows( parameters = [] if cutoff_value is not None: - sql += f"WHERE {updated_at_column} > %s" + sql += f'WHERE "{updated_at_column}" > %s' parameters.append(cutoff_value) if chunk_size: