Re: [FeatureRequest] Base Convert Function

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [FeatureRequest] Base Convert Function
Дата
Msg-id AANLkTikZ8TLjRdtMOK22HKbSRiDk-xsFXtR1j7SRPJZs@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [FeatureRequest] Base Convert Function  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Dne 21. prosince 2010 12:48 Robert Haas <robertmhaas@gmail.com> napsal(a):
> 2010/12/21 Tomáš Mudruňka <tomas@mudrunka.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().  Because PostgreSQL uses an extensible
> architecture, you could load such a function into your copy of
> PostgreSQL and use it in your environment even if it weren't part of
> the core distribution.  There are a number of existing "contrib"
> modules that you can look at for examples of how to do this.
>
> Whether or not we'd accept a patch to add such a function to core or
> contrib, I'm not sure.  Nobody's written one yet...

Most used transformations are available from core now - just need a
wrapper function.

This functions isn't a clean, - should be based on int, long int or bytea?

Pavel


>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Can postgres create a file with physically continuous blocks.
Следующее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: proposal : cross-column stats