Fix namedplaces function that changed its ouputs in PG10

Chained unnests have changed its behavior in PG10. In previous versions
if the unnested arrays had different cardinality the function
automatically fills the gaps duplicating the content of the array with
less cardinality but not anymore.
This commit is contained in:
Mario de Frutos
2018-02-14 14:24:08 +01:00
parent 5df9e5b850
commit 32ce9c1bba
2 changed files with 14 additions and 5 deletions

View File

@@ -42,8 +42,8 @@ SELECT (geocode_namedplace(Array['Portland', 'Portland', 'New York City'], Array
q | a1 | c | geom | success
---------------+--------+-----+------+---------
New York City | | USA | | f
Portland | Oregon | USA | | f
Portland | Maine | USA | | f
Portland | Oregon | USA | | f
(3 rows)
SELECT namedplace_guess_country(Array['granada', 'jaen', 'cordoba', 'madrid', 'valladolid']);