X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 82B8F3A3C7C for ; Tue, 23 Nov 2004 07:51:01 +0000 (GMT) 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 46271-04 for ; Tue, 23 Nov 2004 07:50:31 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id 255B53A3B13 for ; Tue, 23 Nov 2004 07:50:31 +0000 (GMT) Received: from [61.3.110.135] (helo=thenilgiris.com) by sharp.noc24x7.com with esmtpa (Exim 4.43) id 1CWVRW-0005Sl-2l; Tue, 23 Nov 2004 13:20:31 +0530 Received: from localhost (localhost [[UNIX: localhost]]) by thenilgiris.com (8.11.2/8.11.2) id iAN7eSI15714; Tue, 23 Nov 2004 13:10:28 +0530 Content-Type: text/plain; charset="iso-8859-1" From: Kenneth Gonsalves To: "Premsun Choltanwanich" , , Subject: Re: Image Insert Postgresql DB Date: Tue, 23 Nov 2004 13:10:27 +0530 X-Mailer: KMail [version 1.2] References: In-Reply-To: MIME-Version: 1.0 Message-Id: <0411231310270N.01150@thenilgiris.com> Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: 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: 200411/244 X-Sequence-Number: 19563 On Tuesday 23 November 2004 12:48 pm, Premsun Choltanwanich wrote: > I face this same problem when I try to insert image by lo_import to > database with my client files. I already change the way to bytea data > type but it's not work. The error return like type mismatch when I try > to insert it from Binary variable. > > Why I cannot insert it? If anybody found some solution please reply on > this topic for me too. you must escape the octets with \\ that is two backslashes and not one backslash. for example if your binary data is like this: \x05\x00\x02 you must make it like so: \\x05\\x00\\x02 please see chapter 8.4 of the postgresql manual. kg