X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7C4625E46CC for ; Fri, 13 Aug 2004 12:39:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97408-03 for ; Fri, 13 Aug 2004 15:39:25 +0000 (GMT) Received: from laas.laas.fr (laas.laas.fr [140.93.0.15]) by svr1.postgresql.org (Postfix) with ESMTP id 856AF5E46C8 for ; Fri, 13 Aug 2004 12:39:15 -0300 (ADT) Received: by laas.laas.fr (8.12.11/8.12.11) with SMTP id i7DFdL0T025348; Fri, 13 Aug 2004 17:39:22 +0200 (CEST) To: Tom Lane Cc: PostgreSQL Interfaces Subject: Re: large object I/O seeing \\xxx encoding with v3 References: <22987.1092406206@sss.pgh.pa.us> From: Eric Marsden Organization: LAAS-CNRS http://www.laas.fr/ X-URL: http://www.chez.com/emarsden/ X-Message-Flags: Invalid humor format X-Eric-Conspiracy: there is no conspiracy X-Attribution: ecm Date: Fri, 13 Aug 2004 17:39:21 +0200 In-Reply-To: <22987.1092406206@sss.pgh.pa.us> (Tom Lane's message of "Fri, 13 Aug 2004 10:10:06 -0400") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/14 X-Sequence-Number: 5062 >>>>> "tl" == Tom Lane writes: ecm> When using the v3 fe/be protocol, data read and written to large ecm> objects via the loread and lowrite functions seems to be \\xxx ecm> encoded, as per literal escaping or data for the BYTEA type. For ecm> instance, newlines written using lowrite() are later received as ecm> \\012. tl> It sounds to me like you have asked for textual rather than binary tl> results from loread. you're right; I am sending the type of the argument as 0, so it's text. It seems to me that it would be more useful, and more consistent with the way text is handled in the fe/be protocol, to use the character encoding that was requested by the client (the equivalent of PQsetClientEncoding) instead of this literal \xxx escaping. Would be a backwards-incompatible change, though. Thanks, -- Eric Marsden