PostGIS extract coordinates from POLYGON

Cast the GeoJson geometry to json then extract the coordinates:

SELECT 
  ST_AsGeoJSON(geom) :: json->'coordinates' AS coordinates
FROM
  your_table;

See the Examples section in the ST_AsGeoJSON docs as well as the JSON functions reference for PostgreSQL.


Use the function st_dumppoints to extract all points of a geometry and the functions ST_x and ST_y to extract the coordinates of the points. Then use array_agg and array_to_string for build a row with all coordinates

Try this query:

SELECT array_to_string(array_agg, ',') FROM 
(SELECT array_agg( ST_x(geom)||' '||ST_y(geom))  FROM 
    (SELECT (ST_dumppoints(coverage_area)).geom FROM your_table
    ) AS foo_1
) AS foo_2;