From: Regina Obe Date: Tue, 27 Sep 2011 03:15:41 +0000 (+0000) Subject: wrap examples in cdata tags so don't break parser X-Git-Tag: 2.0.0alpha1~954 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d4afd77f7845952dda7c5b69d4ab0951a7a7ab4;p=postgis wrap examples in cdata tags so don't break parser git-svn-id: http://svn.osgeo.org/postgis/trunk@7900 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_operator.xml b/doc/reference_operator.xml index 50cff1d06..26106ed70 100644 --- a/doc/reference_operator.xml +++ b/doc/reference_operator.xml @@ -1107,11 +1107,9 @@ select 'LINESTRING(0 0, 1 1)'::geometry ~= 'LINESTRING(0 1, 1 0)'::geometry as e Examples - - -SELECT ST_Distance(geom, 'SRID=3005;POINT(1011102 450541)'::geometry) as d,edabbr, vaabbr + d | edabbr | vaabbr ------------------+--------+-------- @@ -1127,12 +1125,10 @@ ORDER BY d limit 10; 18472.5531479404 | ALQ | 002 (10 rows) - Then the KNN raw answer: - -SELECT st_distance(geom, 'SRID=3005;POINT(1011102 450541)'::geometry) as d,edabbr, vaabbr + 'SRID=3005;POINT(1011102 450541)'::geometry limit 10; +ORDER BY geom <-> 'SRID=3005;POINT(1011102 450541)'::geometry limit 10;]]> d | edabbr | vaabbr ------------------+--------+-------- @@ -1151,14 +1147,13 @@ ORDER BY geom <-> 'SRID=3005;POINT(1011102 450541)'::geometry limit 10; Note the misordering in the actual distances and the different entries that actually show up in the top 10. Finally the hybrid: - -WITH index_query AS ( - SELECT st_distance(geom, 'SRID=3005;POINT(1011102 450541)'::geometry) as d,edabbr, vaabbr + 'SRID=3005;POINT(1011102 450541)'::geometry LIMIT 100) SELECT * FROM index_query - ORDER BY d limit 10; + ORDER BY d limit 10;]]> d | edabbr | vaabbr ------------------+--------+--------