[postgis-users] binary cursor returning truncated data
Markus Schaber
schabi at logix-tt.com
Tue Apr 18 04:47:36 PDT 2006
Hi, Eric,
Eric Mauvière wrote:
> i am trying to retrieve binary content of a bytea field (or postgis
> geometry field) with a binary cursor with PHP :
>
> $sql="BEGIN;DECLARE mycursor BINARY CURSOR FOR SELECT shape FROM
> $layerName; fetch all in mycursor;"
> ....pg_query...
>
> But my shape field shows only two bytes of data.
>
> Does someone know if it is a current PHP restriction ?
For geometries, the third byte is likely to be a 0-byte. So I think that
PHP cannot cope with binary contents.
Can you try with a binary cursor and bytea type, and if it fails there,
too, ask on a postgresql-php list as they may be more esperienced with this?
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
More information about the postgis-users
mailing list