casting int to bit - Mailing list pgsql-sql

From sad
Subject casting int to bit
Date
Msg-id 200406111132.58908.sad@bankir.ru
Whole thread Raw
List pgsql-sql
PLEASE NOTE :

select 1::int8::bit(64);
0000000000000000000000000000000000000000000000000000000000000001

select 1::int4::bit(64);
0000000000000000000000000000000100000000000000000000000000000000

select 1::int2::bit(64);
ERROR:  Cannot cast type smallint to bit

the last is a great surprise for me !



pgsql-sql by date:

Previous
From: Stephen Quinney
Date:
Subject: Re: Converting integer to binary
Next
From: Franco Bruno Borghesi
Date:
Subject: Re: (No Subject)