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

PostGIS trac at osgeo.org
Sun Sep 2 23:51:58 PDT 2012


#1869: ST_AsBinary is not unique (again)
----------------------+-----------------------------------------------------
  Reporter:  nidi     |       Owner:  pramsey
      Type:  defect   |      Status:  closed 
  Priority:  medium   |   Milestone:         
 Component:  postgis  |     Version:  2.0.x  
Resolution:  wontfix  |    Keywords:         
----------------------+-----------------------------------------------------
Changes (by erilem):

 * cc: erilem (added)


Comment:

 Here's a query that works with 1.x and does not work with 2.x:

 {{{
 SELECT
   anon.lake_id, ST_AsBinary(anon.lake_geom)
 FROM
   (SELECT
      lake.id AS lake_id, ST_AsBinary(lake.geom) AS lake_geom
    FROM
      lake
    WHERE
      lake.geom IS NULL
    UNION
    SELECT
      lake.id AS lake_id, ST_AsBinary(lake.geom) AS lake_geom
    FROM
      lake
    WHERE
      lake.geom IS NOT NULL
   ) AS anon;
 }}}

 The error:

 {{{
 function st_asbinary(bytea) is not unique
 LINE1: SELECT anon.lake_id, ST_AsBinary(anon...
 HINT:  Could not choose a best candidate function. You might need to add
 explicit type casts.
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1869#comment:3>
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