Re: [GENERAL] problem with bit(n) type

2005-10-12 Thread Martijn van Oosterhout
On Wed, Oct 12, 2005 at 12:24:41PM +0400, Sergey Karin wrote: > 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

Re: [GENERAL] problem with bit(n) type

2005-10-12 Thread TJ O'Donnell
Binary data in bit(n) has no text equivalent, and so cannot be "cast" as text. It has an "external representation", e.g. B'10010101', but this is not the same as a cast. In some cases, where there bit(n) has (n mod 8) = 0 and the bitstring happens to be valid ascii in the text range, one could sa

[GENERAL] problem with bit(n) type

2005-10-12 Thread Sergey Karin
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=#