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 E0B6252AB8 for ; Mon, 15 Aug 2005 12:48:56 -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 38864-07 for ; Mon, 15 Aug 2005 15:48:53 +0000 (GMT) Received: from server.bluefire-systems.co.uk (ns.bluefire-systems.co.uk [217.199.164.113]) by svr1.postgresql.org (Postfix) with ESMTP id 11963529D9 for ; Mon, 15 Aug 2005 12:48:50 -0300 (ADT) Received: from host217-35-95-235.in-addr.btopenworld.com ([217.35.95.235] helo=Aurora) by server.bluefire-systems.co.uk with esmtp (Exim 4.42) id 1E4hMz-0002ex-E4 for pgsql-sql@postgresql.org; Mon, 15 Aug 2005 16:59:25 +0100 From: "Simon Kinsella" To: Subject: PGSQL function for converting between arbitrary numeric bases? Date: Mon, 15 Aug 2005 16:48:40 +0100 Organization: Bluefire Systems Ltd MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcWhsG7zdPXBmGW0Tz6476iYsHnPNA== Message-Id: <20050815154850.11963529D9@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.704 required=5 tests=[MSGID_FROM_MTA_ID=1.704] X-Spam-Level: * X-Archive-Number: 200508/157 X-Sequence-Number: 22385 Hello, I'm looking - without luck so far - for a PGSQL function for converting numbers between two arbitrary bases (typically base 10,16 and 26 in my case). Something similar to the C 'strtol' function or, ideally, PHP's baseconvert(string,frombase,tobase) function. I've search the docs, lists and various other forums but so far no luck. Just wondered if I've missed anything - all suggestions gratefully received. Many thank, Simon K