When working with a spatial database, it is often convenient to make a sanity check for a location of a point by viewing it on Google Maps (or any other online mapping service).
Copying the lat/lon is tedious - it requires me to manually copy-paste data from the console to the browser, and since st_asText
order (lon, lat) is the opposite of Google (lat, lon) I have to do it twice and add a comma in between. Impractical for fast checking a dozen or so points.
How do I generate a valid Google Maps or a Bing map link from a PostGIS geometry?