BUG #3765: strange results for bit string hex notation cast to bit

From: "Cade Cairns" <cadec(at)otii(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3765: strange results for bit string hex notation cast to bit
Date: 2007-11-20 21:22:30
Message-ID: 200711202122.lAKLMUQf001849@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: 3765
Logged by: Cade Cairns
Email address: cadec(at)otii(dot)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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-20 21:42:57 Re: BUG #3765: strange results for bit string hex notation cast to bit
Previous Message Tom Lane 2007-11-20 18:28:43 Re: BUG #3764: Update count returns zero for a view with 'on update' rules when criteria contains updatable field