Search Postgresql Archives

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

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

 



On Thu, Feb 10, 2005 at 12:00:31AM -0700, Michael Fuhr wrote:
> 
> CREATE FUNCTION bit2text(bit) RETURNS text AS '
> BEGIN
>     RETURN $1;
> END;
> ' LANGUAGE plpgsql IMMUTABLE STRICT;

This also appears to work:

CREATE TABLE foo (b varbit);
INSERT INTO foo VALUES ('10011');
SELECT textin(bit_out(b)) FROM foo;

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[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