I have PostGIS database, and want to extract lat, lon pairs sequence from Polygons (and MultiPolygons). As a very fresh PostGIS user, I'm able to just extract the Polygons:
SELECT st_astext("GEOMETRY"::geometry) FROM my_postgisdb;
which outputs Polygons and MultiPoligons.
How should I extract x, y pairs from these structures?