Files
data-services/geocoder/extension/expected/20_admin0_test.out
Mario de Frutos 5df9e5b850 Fixed to keep the provider order in the results
Also now is compatible with PG10
2018-02-14 14:23:19 +01:00

28 lines
886 B
Plaintext

-- Check that the synonym function is callable, should return NULL
SELECT (admin0_synonym_lookup(Array['United States', 'ESP'])).*;
q | adm0_a3
---------------+---------
United States |
ESP |
(2 rows)
-- Check that the geocoding function is callable, should return success = false
SELECT (geocode_admin0_polygons(Array['Spain', 'USA', ''])).*;
q | geom | success
-------+------+---------
Spain | | f
USA | | f
| | f
(3 rows)
-- Add a few synonyms
COPY admin0_synonyms (name, rank, created_at, updated_at, the_geom, the_geom_webmercator, cartodb_id, adm0_a3, name_) FROM stdin;
-- Check that the synonym function is callable, should return their iso codes
SELECT (admin0_synonym_lookup(Array['United States', 'ESP'])).*;
q | adm0_a3
---------------+---------
United States | USA
ESP | ESP
(2 rows)