[postgis-users] postgis support for 7.4 betas

Jeff Hoffmann jeff at propertykey.com
Mon Sep 29 06:14:25 PDT 2003


Jeff Hoffmann wrote:
> I'm trying to use PostgreSQL 7.4b3/PostGIS 0.7.5(patched with new 
> estimate code you gave me) along with MapServer 4.0.  Something has 
> broken the binary cursors that MapServer uses when it queries the 
> database for a layer.  Here's the error that I get:
> 
> msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS  SQL 
>  statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT 
> asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from 
> county WHERE the_geom && setSRID('BOX3D(-82.2975991147483 
> 27.9197193376958,-82.2935143751022 27.9224420799425)'::BOX3D, 
> find_srid('','county','the_geom') )
> -ERROR:  no binary output function available for type wkb
> 
> When I execute the query outside of the cursor it seems to work & when I 
> do it with a standard (non-binary) cursor, it apparently works.  Only in 
> the binary cursor do I get the "no binary output function available..." 
> error.  Do you have any ideas why this would be happening or even some 
> clues to searching out what has changed to cause this problem in 7.4?

Just to follow up, I did some digging around & ended up changing the 
function definition for "asbinary(geometry, text)" to return type 
"bytea" instead of "wkb" & that seemed to solve the problem, although I 
don't know if it's going to break anything as a result.  I'm guessing 
that the bytea(wkb) function was there for just this case & was being 
used in 7.3 but isn't being used for some reason with 7.4.  I know next 
to nothing about the typecasting, though, so it's just a guess.

-- 

Jeff Hoffmann
PropertyKey.com




More information about the postgis-users mailing list