BUG #3861: cannot cast type smallint to bit

From: "Marc mamin" <m(dot)mamin(at)intershop(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3861: cannot cast type smallint to bit
Date: 2008-01-09 09:05:36
Message-ID: 200801090905.m0995aQO040924@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3861
Logged by: Marc mamin
Email address: m(dot)mamin(at)intershop(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message izm_ka 2008-01-09 14:28:55 BUG #3863: libpq.lib missing
Previous Message Sokolov Yura 2008-01-09 08:53:49 Re: BUG #3852: Could not create complex aggregate