Re: Any functions to convert bit(5) to text?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Együd Csaba <csegyud(at)vnet(dot)hu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Any functions to convert bit(5) to text?
Date: 2005-02-10 07:31:57
Message-ID: 20050210073157.GA59824@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 10, 2005 at 12:16:53AM -0700, Michael Fuhr wrote:
>
> SELECT textin(bit_out(b)) FROM foo;

Is it generally true that you can convert between types using the
above method, assuming compatible syntax? That is, using the source
type's output function to get a cstring that you pass to the target
type's input function? Are there any potential problems with doing
this? Is that how the PL/pgSQL RETURN trick works? It seems a
handy way to cast one type to another when no built-in cast or
function exists.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba 2005-02-10 07:55:12 Re: Any functions to convert bit(5) to text?
Previous Message Michael Fuhr 2005-02-10 07:16:53 Re: Any functions to convert bit(5) to text?