diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index ef78434..f565b65 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -284,10 +284,11 @@ BEGIN query := query || format(' ]::numeric[] FROM observatory.%I - WHERE %I.geoid = %L + WHERE %I.%I = %L ', ((data_table_info)[1])->>'tablename', ((data_table_info)[1])->>'tablename', + geoid_colname, geoid );