binary cursor returning truncated data

This is a multi-part message in MIME format.

------=_NextPart_000_01DD_01C65E4C.FCCC9830
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

i am trying to retrieve binary content of a bytea field (or postgis =
geometry field) with a binary cursor with PHP :

$sql=3D"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 ?

Thanks by advance,

Eric
------=_NextPart_000_01DD_01C65E4C.FCCC9830
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2838" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i am trying to retrieve binary content =
of a bytea
field (or postgis geometry field) with a binary cursor with PHP =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>$sql=3D"BEGIN;DECLARE mycursor BINARY =
CURSOR FOR
SELECT shape FROM $layerName; fetch all in mycursor;"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>....pg_query... </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But my shape field shows only two =
bytes of
data.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Does someone know if it is a current =
PHP
restriction ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks by advance,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Eric </FONT></DIV></BODY></HTML>

------=_NextPart_000_01DD_01C65E4C.FCCC9830--
e.mauviere [ Mi, 12 April 2006 16:20 ] [ ID #1276981 ]
Datenbanken » gmane.comp.db.postgresql.php » binary cursor returning truncated data

Vorheriges Thema: phpPgAdmin looking for developers
Nächstes Thema: Unable to connect to PostgreSQL Server: Permission denied