[postgis-devel] [PostGIS] #269: Geometry -> Geography autocast should be explicit
PostGIS
trac at osgeo.org
Thu Oct 15 07:27:21 PDT 2009
#269: Geometry -> Geography autocast should be explicit
-----------------------+----------------------------------------------------
Reporter: mcayland | Owner: pramsey
Type: defect | Status: reopened
Priority: medium | Milestone: postgis 1.5.0
Component: postgis | Version:
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Changes (by robe):
* status: closed => reopened
* resolution: invalid =>
* summary: Geometry -> Geography autocast causes && operator query to
fail => Geometry -> Geography autocast should
be explicit
Old description:
> This is bad:
>
> trunk=# explain analyze select count(*) from cities where the_geog &&
> ST_SetSRID(ST_GeographyFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'),
> 4326);
>
> ERROR: operator is not unique: geography && geometry
> LINE 1: ...nalyze select count(*) from cities where the_geog &&
> ST_SetS...
New description:
Changed subject:
We really shouldn't be allowing people to use functions designated for
geometry with geography data type without forcing them to explicitly cast
to geometry.
-------
This is bad:
trunk=# explain analyze select count(*) from cities where the_geog &&
ST_SetSRID(ST_GeographyFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'),
4326);
ERROR: operator is not unique: geography && geometry
LINE 1: ...nalyze select count(*) from cities where the_geog && ST_SetS...
Comment:
Ah okay that's what you are complaining about. I'm in full agreement with
you on this one then. I'm going to change the subject line to be clearer
and reopen the ticket.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/269#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list