X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1FAABD1B8C2 for ; Fri, 31 Oct 2003 00:20:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 62566-06 for ; Thu, 30 Oct 2003 20:20:14 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id E43E4D1B587 for ; Thu, 30 Oct 2003 20:20:10 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9V0K6it004530; Thu, 30 Oct 2003 19:20:06 -0500 (EST) To: ljb Cc: pgsql-bugs@postgresql.org Subject: Re: pgtcl large object read/write corrupts binary data In-reply-to: References: Comments: In-reply-to ljb message dated "Mon, 27 Oct 2003 02:33:58 +0000" Date: Thu, 30 Oct 2003 19:20:06 -0500 Message-ID: <4529.1067559606@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/187 X-Sequence-Number: 7036 ljb writes: > [Using PostgreSQL-7.3.4 and -7.4beta5, Tcl-8.4.x.] > Binary data written to a Large Object with libpgtcl's pg_lo_write is > corrupted. Tcl is mangling the data - something to do with UTF-8 > conversion. Example: 0x80 becomes 0xc2 0x80, and 0xff becomes 0xc3 0xbf. Patch applied to 7.4, along with a further fix to handle a negative return value from lo_read properly. Thanks for the report and patch! regards, tom lane