X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6946C9FA4CB for ; Thu, 7 Sep 2006 06:14:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 95302-03-8 for ; Thu, 7 Sep 2006 09:14:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by postgresql.org (Postfix) with ESMTP id CF1829FA5CE for ; Thu, 7 Sep 2006 06:13:18 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id 14so59897nzn for ; Thu, 07 Sep 2006 02:13:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jayy00rUs3vT1krlNNvsLbWuLEDYN8AmQBZFbzB/QX5UFoyKfMJmbJnm0A9WuCJqozZXC3DWmNfF14GJxl/8yFVahhlimOZHtJXU0gDovSynCYVRfZU/g+n+/Bw5MG28j0LasA9Z/s5FM3vJDL0QlT5ALWg09X//wzWADcvcKE4= Received: by 10.65.122.15 with SMTP id z15mr317486qbm; Thu, 07 Sep 2006 02:13:17 -0700 (PDT) Received: by 10.64.250.15 with HTTP; Thu, 7 Sep 2006 02:13:17 -0700 (PDT) Message-ID: Date: Thu, 7 Sep 2006 13:13:17 +0400 From: "Nikolay Samokhvalov" Reply-To: nikolay@samokhvalov.com To: "=?ISO-8859-1?Q?Eric_Mauvi=E8re?=" Subject: Re: binary cursor returning truncated data Cc: pgsql-php@postgresql.org In-Reply-To: <019601c662c4$49f171f0$0200a8c0@EMC3> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <020401c65e3c$70721050$0200a8c0@EMC3> <20060416163932.GA30082@winnie.fuhr.org> <015501c662be$419d6460$0200a8c0@EMC3> <4444A324.20904@calorieking.com> <019601c662c4$49f171f0$0200a8c0@EMC3> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/1 X-Sequence-Number: 3598 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=E8re 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=E8re > > ----- Original Message ----- > From: "Christopher Kings-Lynne" > To: "Eric Mauvi=E8re" > Cc: > 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 an= d > >> 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 binar= y > > 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 > --=20 Best regards, Nikolay