Re: BUG #8191: Wrong bit conversion

From: Gerald Luger <GeraldLuger(at)hexboss(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #8191: Wrong bit conversion
Date: 2013-05-31 23:29:56
Message-ID: 7A3A36FE51533446AAB1EA0F6069AC8C40A5B460@HEXBOSSSERVER.hexboss.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Shouldn't I expect all results to be 000...0001?

Otherwise it would be
1 != 1?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, May 31, 2013 5:34 PM
To: Gerald Luger
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #8191: Wrong bit conversion

gerald(at)hexboss(dot)com writes:
> SELECT b'1'::bit(64), x'1'::bit(64), 1::bit(64)

> RESULT:
> "1000000000000000000000000000000000000000000000000000000000000000",
> "0001000000000000000000000000000000000000000000000000000000000000",
> "0000000000000000000000000000000000000000000000000000000000000001"

I believe those are all operating as intended.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2013-06-01 00:29:31 Re: BUG #8191: Wrong bit conversion
Previous Message Tom Lane 2013-05-31 21:33:51 Re: BUG #8191: Wrong bit conversion