BUG #3861: cannot cast type smallint to bit - Mailing list pgsql-bugs

From Marc mamin
Subject BUG #3861: cannot cast type smallint to bit
Date
Msg-id 200801090905.m0995aQO040924@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3861
Logged by:          Marc mamin
Email address:      m.mamin@intershop.de
PostgreSQL version: 8.2.4
Operating system:   Linux
Description:        cannot cast type smallint to bit
Details:

Hello,

This is more a feature request than a bug, but I guess there is no reason
why this should not be possible:

select 1::int2::bit(16)
=> ERROR:  cannot cast type smallint to bit

I guess the correct way to workaround would be:

select (1::int4::bit(32)<<16)::bit(16)

which is a bit complicated :-)

HTH,

Marc Mamin

pgsql-bugs by date:

Previous
From: Sokolov Yura
Date:
Subject: Re: BUG #3852: Could not create complex aggregate
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #3860: xpath crashes backend when is querying xmlagg result