X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3AAD4D1B897 for ; Tue, 27 Apr 2004 10:16:16 -0300 (ADT) 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 72732-10 for ; Tue, 27 Apr 2004 10:16:17 -0300 (ADT) Received: from anchor-post-37.mail.demon.net (anchor-post-36.mail.demon.net [194.217.242.86]) by svr1.postgresql.org (Postfix) with ESMTP id BFE00D1B53B for ; Tue, 27 Apr 2004 10:16:13 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1BISRd-000KjE-0b; Tue, 27 Apr 2004 14:16:17 +0100 Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 290E01593E; Tue, 27 Apr 2004 14:16:16 +0100 (BST) From: Richard Huxton To: "kumar" Subject: Re: Customised Encoding Date: Tue, 27 Apr 2004 14:16:16 +0100 User-Agent: KMail/1.5 References: <00f501c42c24$7c16f2a0$7502a8c0@hdsc.com> <200404271309.55818.dev@archonet.com> <020c01c42c56$ec39b130$7502a8c0@hdsc.com> In-Reply-To: <020c01c42c56$ec39b130$7502a8c0@hdsc.com> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404271416.16156.dev@archonet.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/301 X-Sequence-Number: 17676 On Tuesday 27 April 2004 13:55, kumar wrote: > Hi Richar, Kumar - try to make sure you reply to the list. > It didnt work for me. > > select encode('65536'::bytea,'UTF-8') > ERROR: Cannot cast type integer to bytea > > select encode('65536'::bytea,'UTF-8') > ERROR: No such encoding as 'UTF-8' I think you're using the encode() function wrongly. The second parameter is supposed to be something like "base64" or "hex". I'm not sure it makes sense to try and cast an integer to a bytea either. Can you say what you're trying to achieve here? -- Richard Huxton Archonet Ltd