1
我需要将多边形插入到postgresql表“polygontable”中,然后返回其(the_geom)值以供进一步查询。我想要抓住“polygontable”中最近插入的实例。如何在SELECT语句中调用返回的“polygongeom”?从select语句中调用返回值
INSERT INTO polygontable (the_geom)
VALUES (ST_SetSRID((ST_MakeValid(ST_GeomFromGeoJSON('"+JSON.stringify(payload)+"'))),4326)) returning the_geom as polygon_geom;
SELECT st_intersects(polygon_geom, other_table.the_geom)
from polygon_geom, other_table;