[postgis-devel] [PostGIS] #1869: ST_AsBinary is not unique (again)

PostGIS trac at osgeo.org
Fri Jun 15 04:23:47 PDT 2012


#1869: ST_AsBinary is not unique (again)
---------------------+------------------------------------------------------
 Reporter:  nidi     |       Owner:  pramsey
     Type:  defect   |      Status:  new    
 Priority:  medium   |   Milestone:         
Component:  postgis  |     Version:  trunk  
 Keywords:           |  
---------------------+------------------------------------------------------
 PostGIS 2 introduced the following behavior again, which has already been
 resolved in PostGIS 1.5 (see #252):

 {{{
 SELECT ST_AsBinary('POINT(1 2)');
 }}}

 yields

 {{{
 ERROR:  function st_asbinary(unknown) is not unique
 LINE 1: SELECT ST_AsBinary('POINT(1 2)');
                ^
 HINT:  Could not choose a best candidate function. You might need to add
 explicit type casts.
 }}}


 Explicit type casts do work:

 {{{
 SELECT ST_AsBinary('POINT(1 2)'::geometry);
                  st_asbinary
 ----------------------------------------------
  \x0101000000000000000000f03f0000000000000040
 (1 row)
 }}}

 Is the need of explicitely defining the result intended or a regression?
 If this behavior is intended, libraries such as geoalchemy would need to
 change query construction.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1869>
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