问题
Is there any way to convert Postgres PATH type to an ARRAY in order to have index access to it's points?
回答1:
There is no way to do that with PostgreSQL alone - you'd have to write your own C function.
With the PostGIS extension, you can cast the path
to geometry
and perform the operation there:
SELECT array_agg(CAST(geom AS point))
FROM st_dumppoints(CAST(some_path AS geometry));
来源:https://stackoverflow.com/questions/60389921/postgres-convert-path-type-to-array