X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id B08A411F6CEC for ; Tue, 18 Apr 2006 05:44:35 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.549 X-Spam-Level: X-Spam-Status: No, score=-2.549 required=5 tests=[AWL=0.050, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id RgIg2BKUoo9U for ; Tue, 18 Apr 2006 05:44:29 -0300 (ADT) X-Greylist: delayed 00:43:09.169541 by SQLgrey- Received: from smtp9.wanadoo.fr (smtp9.wanadoo.fr [193.252.22.22]) by postgresql.org (Postfix) with ESMTP id 3336F11F6CCD for ; Tue, 18 Apr 2006 05:44:27 -0300 (ADT) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0902.wanadoo.fr (SMTP Server) with ESMTP id 0C0A31C001E5 for ; Tue, 18 Apr 2006 10:44:27 +0200 (CEST) Received: from EMC3 (AToulouse-152-1-74-109.w83-200.abo.wanadoo.fr [83.200.174.109]) by mwinf0902.wanadoo.fr (SMTP Server) with SMTP id D10B91C001C9 for ; Tue, 18 Apr 2006 10:44:26 +0200 (CEST) X-ME-UUID: 20060418084426856.D10B91C001C9@mwinf0902.wanadoo.fr Message-ID: <019601c662c4$49f171f0$0200a8c0@EMC3> From: =?iso-8859-1?Q?Eric_Mauvi=E8re?= To: References: <020401c65e3c$70721050$0200a8c0@EMC3> <20060416163932.GA30082@winnie.fuhr.org> <015501c662be$419d6460$0200a8c0@EMC3> <4444A324.20904@calorieking.com> Subject: Re: binary cursor returning truncated data Date: Tue, 18 Apr 2006 10:44:21 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-Archive-Number: 200604/13 X-Sequence-Number: 3483 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" To: "Eric Mauvière" 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 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 > >