Re: [BUGS] BUG #3765: strange results for bit string hex notation cast to bit

2007-11-20 Thread Kevin Grittner
>>> On Tue, Nov 20, 2007 at 3:47 PM, in message <[EMAIL PROTECTED]>, Cade Cairns <[EMAIL PROTECTED]> wrote: > On 20-Nov-07, at 2:42 PM, Heikki Linnakangas wrote: >> >> http://www.postgresql.org/docs/8.1/interactive/datatype-bit.html >> >> "Note: If one explicitly casts a bit-string value to bit(

Re: [BUGS] BUG #3765: strange results for bit string hex notation cast to bit

2007-11-20 Thread Cade Cairns
Can anyone explain why this is the case? On 20-Nov-07, at 2:42 PM, Heikki Linnakangas wrote: Cade Cairns wrote: 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

Re: [BUGS] BUG #3765: strange results for bit string hex notation cast to bit

2007-11-20 Thread Heikki Linnakangas
Cade Cairns wrote: 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

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

2007-11-20 Thread Cade Cairns
The following bug has been logged online: Bug reference: 3765 Logged by: Cade Cairns Email address: [EMAIL PROTECTED] 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 casti