[postgis-devel] [PostGIS] #292: Can not order by geography

PostGIS trac at osgeo.org
Mon Nov 9 22:12:10 PST 2009


#292: Can not order by geography
----------------------+-----------------------------------------------------
  Reporter:  robe     |       Owner:  pramsey      
      Type:  defect   |      Status:  new          
  Priority:  medium   |   Milestone:  postgis 1.5.0
 Component:  postgis  |     Version:  trunk        
Resolution:           |    Keywords:               
----------------------+-----------------------------------------------------
Comment (by robe):

 For completeness these are the situations where this shows its ugly head

 {{{
 -- the obvious order by
 SELECT g.gid, g.the_geog
 FROM g
 ORDER BY g.the_geog;
 }}}
 {{{
 -- the group by
 SELECT g.gid, g.the_geog, SUM(sales)
 FROM g INNER JOIN finl ON g.gid = finl.gid
 GROUP BY g.gid, g.the_geog;
 }}}

 {{{
 -- the distinct
 SELECT DISTINCT g.gid, g.the_geog
 FROM g
 }}}


 {{{
 -- the equality which questionably
 --  well has to be allowed but prone to abuse
 -- get error: ERROR:  operator does not exist: geography = geography
 --  No operator matches the given name and argument type(s).
 -- You might need to add explicit type casts.
 SELECT g.gid,g.the_geog
 FROM g WHERE g.the_geog = ST_GeographyFromText('POINT(1 2)');
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/292#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list