diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index a848216..7f947c6 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -329,7 +329,7 @@ BEGIN EXECUTE format('SELECT geoid FROM observatory.%I - WHERE the_geom && $1', + WHERE ST_WITHIN($1, the_geom)', geom_table_name) USING geom INTO geoid;