Inconsistent shift operator - Mailing list pgsql-bugs

From Roman Kononov
Subject Inconsistent shift operator
Date
Msg-id 48099055.9040607@dls.net
Whole thread Raw
Responses Re: Inconsistent shift operator  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The below test cases show the obvious inconsistency between different
integer types.

Regards,

Roman

test=# \t
Showing only tuples.
test=# select 1::int2 << 17;
         0

test=# select 1::int4 << 33;
         2

test=# select 1::int8 << 65;
         2

test=# select 2::int2 >> 17;
         0

test=# select 2::int4 >> 33;
         1

test=# select 2::int8 >> 65;
         1

pgsql-bugs by date:

Previous
From: Terry Lee Tucker
Date:
Subject: Re: Request
Next
From: "Roman Kononov"
Date:
Subject: BUG #4114: Inconsistent shift operator