Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,
at the first glance it seems to be perfect. In addition it works even for
arrays. Wow! :)

Thank you very much,
-- Csaba 

-----Original Message-----
From: Michael Fuhr [mailto:mike@xxxxxxxx] 
Sent: Thursday, February 10, 2005 8:32 AM
To: Együd Csaba
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Any functions to convert bit(5) to text?

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/

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 2005.02.07.
 


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux