I imported a shapefile ("Test.shp") using DB Manager and ran the following query to extract distances between the outer rings of polygons:
SELECT a.gid from_gid, b.gid to_gid, st_shortestline(a.the_geom,b.the_geom), st_distance(a.the_geom,b.the_geom) AS distanceFROMpublic."Test" AS a,(SELECT*...