Open markddrake opened 2 years ago
The following works in both
select array_agg(point((p ->> 0)::double precision,(p ->> 1)::double precision)) points
from jsonb_array_elements(jsonb_extract_path('{"type": "Polygon", "coordinates": [[[0, 0], [1, 3], [2, 0], [0, 0]]]}'::jsonb,'coordinates','0')) p
The query doesn't work in PG 13:
https://dbfiddle.uk/?rdbms=postgres_13&fiddle=f4999bde8230dbbc737aebd8f898e6ff
This is because jsonb access using array notation came in PG 14.
Thanks, I just set up a generic 11.2 Postgres container, so I'll catch these in future.
Jira Link: DB-2890
Description
The following works in Postgres 14
But fails in Yugabyte