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