problem with bit(n) type
От | Sergey Karin |
---|---|
Тема | problem with bit(n) type |
Дата | |
Msg-id | b78883bf0510120124o64eb2cc7j@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: problem with bit(n) type
|
Список | pgsql-general |
Hi, List! kosten=# select version(); version --------------------------------------------------------------------------- PostgreSQL 8.0.0rc5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 (1 row) kosten=# create table foo(t bit(4)); CREATE TABLE kosten=# insert into foo values(B'0011'); INSERT 985996 1 kosten=# select t from foo; t ------ 0011 (1 row) But if I do something like this: kosten=# select t::text from foo; ERROR: cannot cast type bit to text I get an error. Okay the system cannot cast bit to text... But this is the big problem for me... Is there a way to cast bit(n) to text or varchar? thanks in advance. Sergey Karin PS. I have found that there are some functions: varbit_in() and varbit_out(). But they works with internal type cstring. And I cannot cast cstring to varchar or text.
В списке pgsql-general по дате отправления: