Skip site navigation (1) Skip section navigation (2)

Re: binary cursor returning truncated data

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: Eric Mauvière <e(dot)mauviere(at)geoclip(dot)fr>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: binary cursor returning truncated data
Date: 2006-09-07 09:13:17
Message-ID: e431ff4c0609070213necd90advbf0493022240d285@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-php
Is this issue still open?

Some guys say me that they experience similar troubles and this may
prevent them from migrating from OneBigWellKnownDBMS to Postgres.

On 4/18/06, Eric Mauvière <e(dot)mauviere(at)geoclip(dot)fr> wrote:
> 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
> >
> >
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>


-- 
Best regards,
Nikolay

In response to

pgsql-php by date

Next:From: Richmond DyesDate: 2006-09-14 13:52:49
Subject: Having problems with user defined sessions using postgresql as my session manager
Previous:From: babak badaeiDate: 2006-08-31 20:07:59
Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group