From 379257b4b49f1e541d84bb1e0444c95dd504052b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Wed, 27 Jun 2018 19:07:19 +0200 Subject: [PATCH] Fix quota check --- client/sql/21_bulk_geocoding_functions.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/sql/21_bulk_geocoding_functions.sql b/client/sql/21_bulk_geocoding_functions.sql index b3ff689..4fbd5d1 100644 --- a/client/sql/21_bulk_geocoding_functions.sql +++ b/client/sql/21_bulk_geocoding_functions.sql @@ -24,7 +24,7 @@ BEGIN RAISE DEBUG 'cdb_bulk_geocode_street_point --> query_row_count: %; query: %; country: %; state: %; city: %; street: %', query_row_count, query, country_column, state_column, city_column, street_column; SELECT cdb_dataservices_client.cdb_enough_quota('hires_geocoder', query_row_count) INTO enough_quota; - IF enough_quota IS NOT NULL AND enough_quota THEN + IF enough_quota IS NOT NULL AND NOT enough_quota THEN RAISE EXCEPTION 'Remaining quota: %. Estimated cost: %', remaining_quota, query_row_count; END IF;