Re: Any functions to convert bit(5) to text?
От | Együd Csaba |
---|---|
Тема | Re: Any functions to convert bit(5) to text? |
Дата | |
Msg-id | 0IBO00AZ7RC1J2@mail.vnet.hu обсуждение исходный текст |
Ответ на | Re: Any functions to convert bit(5) to text? (Michael Fuhr <mike@fuhr.org>) |
Список | pgsql-general |
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@fuhr.org] Sent: Thursday, February 10, 2005 8:32 AM To: Együd Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] 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.
В списке pgsql-general по дате отправления: