[postgis-devel] [PostGIS] #536: Get rid of the STRICT on geography ST_Intersects
PostGIS
trac at osgeo.org
Tue Jun 1 07:19:56 PDT 2010
#536: Get rid of the STRICT on geography ST_Intersects
----------------------+-----------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by mcayland):
I don't think the platform is an issue here. Marking a function as
IMMUTABLE means that for a constant input, it returns a constant output
which does seem to make sense in this in-line context. IIRC PostgreSQL
changed a while back so that by default all functions are marked as
VOLATILE by default which is perhaps why it's taken us a while to notice.
So I'm leaning towards thinking Regina is not too far off the mark with
this fix.
Incidentally, does the following variation also work?
CREATE OR REPLACE FUNCTION st_intersects(geography, geography)
RETURNS boolean AS
'SELECT $1 && $2 AND _ST_Distance($1, $2, 0.0, false) < 0.00001'
LANGUAGE 'sql' IMMUTABLE STRICT
COST 100;
Mark.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/536#comment:9>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list