Re: [FeatureRequest] Base Convert Function

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomáš Mudruňka <tomas(at)mudrunka(dot)cz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [FeatureRequest] Base Convert Function
Date: 2010-12-21 14:04:03
Message-ID: 7E8856BA-AE6B-4550-BA76-D6B059C4D600@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec21, 2010, at 12:48 , Robert Haas wrote:
> 2010/12/21 Tomáš Mudruňka <tomas(at)mudrunka(dot)cz>:
>> Is there possibility of having internal base converting function in PgSQL?
>> There are already functions for converting between decimal and hexadecimal
>> notations i think pgsql can be able to convert between number with radixes
>> from 1 to 36 (actually fast (de)encoding base36 is what i need)...
>
> It should be pretty easy to write such a function in C, perhaps using
> strtol() or strtoul().

If you're not comfortable doing this in C, you might also want to consider
one of procedural languages pl/pgsql, pl/perl, pl/python. pl/pgsql is probably
only viable if you just need this for ints and bigints, unless you don't
care about performance.

best regards,
Florian Pflug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2010-12-21 14:27:04 Re: proposal : cross-column stats
Previous Message Sushant Sinha 2010-12-21 13:38:35 bug in ts_rank_cd