BUG #5237: strange int->bit and bit->int conversions

Поиск
Список
Период
Сортировка
От Roman Kononov
Тема BUG #5237: strange int->bit and bit->int conversions
Дата
Msg-id 200912092006.nB9K6JvK091485@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5237: strange int->bit and bit->int conversions  (Roman Kononov <kononov@ftml.net>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5237
Logged by:          Roman Kononov
Email address:      kononov@ftml.net
PostgreSQL version: 8.4.1
Operating system:   GNU/Linux x86_64
Description:        strange int->bit and bit->int conversions
Details:

test=# select (11::int4<<23 | 11::int4)::bit(32);
 00000101100000000000000000001011

test=# select (11::int4<<23 | 11::int4)::bit(33);
 000001011100000000000000000001011

test=# select (11::int4<<23 | 11::int4)::bit(39);
 000001010000101100000000000000000001011

test=# select (11::int4<<23 | 11::int4)::bit(40);
 0000000000000101100000000000000000001011

The ::bit(33) and ::bit(39) conversions seem wrong.

test-std=# select 1::int4::bit(32)::int4;
    1

test-std=# select 1::int4::bit(33)::int4;
ERROR:  integer out of range

Why is it out of range?

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Mike Landis
Дата:
Сообщение: getting libpqd.lib and libpqd.dll for postgesql 8.4.1 on Vista with VS8 or cygwin g++
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5234: ALTER TABLE ... RENAME COLUMN change view definition incorrectly