On Mon, Sep 3, 2012 at 3:44 AM, binadam <
ibna...@gmail.com> wrote:
> Looks like my last post didn't make, retry...
>
> If I have:
>
> class MyGeom(Base):
> __tablename__ = 'my_geom'
>
> id = Column(Integer, autoincrement=True, primary_key=True)
> geom = Column(Point)
> extra = Column(String)
>
>
> and I do a union e.g.
>
> a = m.DBSession.query( m.MyGeom ).filter(m.MyGeom.extra==None)
> b = m.DBSession.query( m.MyGeom ).filter(m.MyGeom.extra!=None)
> a.union(b)
>
> I get this error:
>
> sqlalchemy.exc.ProgrammingError: (ProgrammingError) function
> st_asbinary(bytea) is not unique
> LINE 1: SELECT anon_1.my_geom_id AS anon_1_my_geom_id, ST_AsBinary(a...
> ^
> HINT: Could not choose a best candidate function. You might need to add
> explicit type casts.
>
>
> I see there is a ticket about this:
>
http://trac.osgeo.org/postgis/ticket/1869
> So my question is there a workaround in geoalchemy using ORM?
> (happens with geoalchemy & geoalchemy2)
Hi
I can indeed reproduce the issue. I don't know how to fix it for now,
but I'll look into it.
--
Eric