Converting integer to binary

Поиск
Список
Период
Сортировка
От Stephen Quinney
Тема Converting integer to binary
Дата
Msg-id 20040610135240.GD27245@computing-services.oxford.ac.uk
обсуждение исходный текст
Ответы Re: Converting integer to binary
Список pgsql-sql
I have searched around but I cannot see any standard way in PostgreSQL
to convert from an integer into a binary representation.

i.e. I want to do:

16 ==> 10000
32 ==> 100000
64 ==> 1000000
96 ==> 1100000

etc..

Now I have an algorithm to do it so I could write an SQL function, I
guess. If there's a standard way to do it though that would be quite nice.

Thanks in advance,

Stephen Quinney



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

Предыдущее
От: Martin Schäfer
Дата:
Сообщение: Re: Find out whether a view's column is indexed?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Schema + User-Defined Data Type Indexing problems...