BUG #3765: strange results for bit string hex notation cast to bit - Mailing list pgsql-bugs

From Cade Cairns
Subject BUG #3765: strange results for bit string hex notation cast to bit
Date
Msg-id 200711202122.lAKLMUQf001849@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #3765: strange results for bit string hex notation cast to bit
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3765
Logged by:          Cade Cairns
Email address:      cadec@otii.com
PostgreSQL version: 8.1.10
Operating system:   Mac OS X 10.5.1
Description:        strange results for bit string hex notation cast to bit
Details:

When casting a bit string constant using hexadecimal notation to a longer
bit string, the result is padded with 0's on the right. This will result in
inconsistent/useless results:

test=# select x'ff'::integer;
 int4
------
  255
(1 row)

test=# select x'ff'::bit(16)::integer;
 int4
-------
 65280
(1 row)

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #3764: Update count returns zero for a view with 'on update' rules when criteria contains updatable field
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #3765: strange results for bit string hex notation cast to bit