Re: Converting integer to binary - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Converting integer to binary
Date
Msg-id 20040610182756.GA22247@wolff.to
Whole thread Raw
In response to Converting integer to binary  (Stephen Quinney <stephen.quinney@computing-services.oxford.ac.uk>)
Responses Re: Converting integer to binary  (Chris Gamache <cgg007@yahoo.com>)
List pgsql-sql
On Thu, Jun 10, 2004 at 14:52:41 +0100, Stephen Quinney <stephen.quinney@computing-services.oxford.ac.uk> wrote:
> 
> I have searched around but I cannot see any standard way in PostgreSQL
> to convert from an integer into a binary representation.
> 
> 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.

There doesn't seem to currently be a function that does this. to_char
would be the logical place since that is what is used to convert various
numeric types to strings with a decimal representation.


pgsql-sql by date:

Previous
From: Franco Bruno Borghesi
Date:
Subject: Re: query optimization
Next
From: Chris Gamache
Date:
Subject: Re: Converting integer to binary