From 59682fae02044c8adc43eb8fd625d688a0281efd Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Sun, 18 Aug 2019 12:55:01 +0000 Subject: [PATCH] [doc] geometry polygon ST_Intersects example Closes #4248 git-svn-id: http://svn.osgeo.org/postgis/trunk@17728 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_relationship.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/reference_relationship.xml b/doc/reference_relationship.xml index af74cbae8..e753456ce 100644 --- a/doc/reference_relationship.xml +++ b/doc/reference_relationship.xml @@ -1116,7 +1116,14 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry --------------- t (1 row) - + +-- Look up in table. Make sure table has a GiST index on geometry column for faster lookup. +SELECT id, name FROM cities WHERE ST_Intersects(geom, 'SRID=4326;POLYGON((28 53,27.707 52.293,27 52,26.293 52.293,26 53,26.293 53.707,27 54,27.707 53.707,28 53))'); + id | name +----+------- + 2 | Minsk +(1 row) + Geography Examples -- 2.40.0