pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eric Mauvière <e.mauviere@geoclip.fr>
To: pgsql-php@postgresql.org
Subject: Re: binary cursor returning truncated data
Date: Tue, 18 Apr 2006 10:44:21 +0200
Message-ID: <019601c662c4$49f171f0$0200a8c0@EMC3> (raw)
References: <020401c65e3c$70721050$0200a8c0@EMC3>
	<20060416163932.GA30082@winnie.fuhr.org>
	<015501c662be$419d6460$0200a8c0@EMC3>
	<4444A324.20904@calorieking.com>

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.kings-lynne@calorieking.com>
To: "Eric Mauvière" <e.mauviere@geoclip.fr>
Cc: <pgsql-php@postgresql.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
>
> 






view thread (7+ messages)  latest in thread

Message-ID: <019601c662c4$49f171f0$0200a8c0@EMC3>
Permalink:  ../019601c662c4$49f171f0$0200a8c0@EMC3/
Also on:    postgresql.org/message-id/019601c662c4$49f171f0$0200a8c0@EMC3

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: e.mauviere@geoclip.fr
  Subject: Re: binary cursor returning truncated data
  In-Reply-To: <019601c662c4$49f171f0$0200a8c0@EMC3>
  References: <020401c65e3c$70721050$0200a8c0@EMC3> <20060416163932.GA30082@winnie.fuhr.org> <015501c662be$419d6460$0200a8c0@EMC3> <4444A324.20904@calorieking.com> <019601c662c4$49f171f0$0200a8c0@EMC3>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox