BUG #4114: Inconsistent shift operator

From: "Roman Kononov" <kononov(at)dls(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4114: Inconsistent shift operator
Date: 2008-04-19 06:36:16
Message-ID: 200804190636.m3J6aGso078172@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: 4114
Logged by: Roman Kononov
Email address: kononov(at)dls(dot)net
PostgreSQL version: 8.3.1
Operating system: x86_64 GNU/Linux
Description: Inconsistent shift operator
Details:

The below test cases show the obvious inconsistency between different
integer types.

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Ruoso 2008-04-19 11:38:24 BUG #4115: PostgreSQL ISO format is not really ISO
Previous Message Roman Kononov 2008-04-19 06:25:25 Inconsistent shift operator