From: | Eric Mauvière <e(dot)mauviere(at)geoclip(dot)fr> |
---|---|
To: | <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: binary cursor returning truncated data |
Date: | 2006-04-18 08:44:21 |
Message-ID: | 019601c662c4$49f171f0$0200a8c0@EMC3 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Hello Christopher,
i simply want to retrieve the content of a binary field in a Postgresql
table, and use that information in a PHP script.
That binary field contains binary information that must be read with PHP
binary functions (unpack).
The current way : POSTGRES cursor -> text version of the binary field in
PHP -> conversion back to a binary string with pg_unescape_bytea
is tedious and brings performance issues.
best regards,
Eric Mauvière
----- Original Message -----
From: "Christopher Kings-Lynne" <chris(dot)kings-lynne(at)calorieking(dot)com>
To: "Eric Mauvière" <e(dot)mauviere(at)geoclip(dot)fr>
Cc: <pgsql-php(at)postgresql(dot)org>
Sent: Tuesday, April 18, 2006 10:28 AM
Subject: Re: [PHP] binary cursor returning truncated data
>> for that confirmation
>>
>> I reported the bug to the PHP team, and they issued a patch.
>>
>> I would also suggest to postgres developpers to simplify their code and
>> go back to SQL standards :)
>> That BINARY CURSOR thing should be avoided. With MySQL for instance, a
>> cursor will read the same way any type of data, binary or text.
>
> I think you're rather confused. The BINARY CURSOR is for emitted binary
> data, not reading it. If you declare a normal cursor over a binary
> (bytea) field, you will get its text representation quite happily.
>
> Chris
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2006-04-20 01:37:56 | phpPgAdmin looking for developers |
Previous Message | Christopher Kings-Lynne | 2006-04-18 08:28:20 | Re: binary cursor returning truncated data |