Re: convert very large unsigned numbers to base62?

From: "Stuart Cooper" <stuart(dot)cooper(at)gmail(dot)com>
To: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: convert very large unsigned numbers to base62?
Date: 2008-05-15 00:52:17
Message-ID: 7fc8628a0805141752q3e17d6d1md2425405591d86da@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I'd like to convert very large unsigned numbers (ala bigint) to a text
> string using base62. I created this PL/PERL function to do the trick:

base 62 is cruel and unusual punishment. Introduce two more printing
characters to your set a..z, A..Z, 0..9 such as "_" and "!" and do it in base 64
instead. There's probably plenty of standard tools and convertors to do
things in base 64.

Best regards,
Stuart Cooper.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-05-15 01:11:51 Re: psql \pset pager
Previous Message Dann Corbit 2008-05-15 00:39:27 Re: bug on ALTER TABLE