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 E4E5FD1B45E for ; Tue, 27 Apr 2004 09:09:57 -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 56230-01 for ; Tue, 27 Apr 2004 09:09:57 -0300 (ADT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id AB03AD1B897 for ; Tue, 27 Apr 2004 09:09:53 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.35 #1) id 1BIRPQ-000NXn-0Z; Tue, 27 Apr 2004 13:09:56 +0100 Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id B1A7715977; Tue, 27 Apr 2004 13:09:55 +0100 (BST) From: Richard Huxton To: "kumar" , "pgsql" Subject: Re: Customised Encoding Date: Tue, 27 Apr 2004 13:09:55 +0100 User-Agent: KMail/1.5 References: <00f501c42c24$7c16f2a0$7502a8c0@hdsc.com> In-Reply-To: <00f501c42c24$7c16f2a0$7502a8c0@hdsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404271309.55818.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/298 X-Sequence-Number: 17673 On Tuesday 27 April 2004 07:54, kumar wrote: > Dear Friends, > > Postgres 7.3.2 Runing on Linux 7.2 > > I would like to convert any values in between 1 to 2^16 into a single > charactor. And decode that single char to get back the numeric value again. > Any function to do that in Postgres SQL Server. You could use unicode (e.g. UTF-8) encoding. I don't see what it gains you though. What do you hope to achieve by storing numerical data as characters? -- Richard Huxton Archonet Ltd