I’m surprised this isn’t possible. Is there an alternative?
SELECT st_point(37.5, 45.5)::string;
-- SQL compilation error: invalid type [CAST(ST_POINT(TO_DOUBLE(37.5), TO_DOUBLE(45.5)) AS VARCHAR(16777216))] for parameter 'TO_VARCHAR'
The reason why I want to do this is that I’m using st_collect
, which returns a multipoint object. I would like to convert a multipoint into a linestring, but apparently st_makeline
only allows 2 points and I have many.
A simple fix is to replace the string, but it doesn’t seem to be allowed.