Re: bit strings - anyone working on them?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bit strings - anyone working on them?
Date: 2003-04-23 15:29:34
Message-ID: 26693.1051111774@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> At 10:36 AM 23/04/2003 -0400, Tom Lane wrote:
>> assumption that the result of casting int to bit(n) and then to bit(m)
>> should agree with the result of casting int directly to bit(m).

> I'm not sure I follow the implication; in fact I would hope that:
> Cast(B'0001' as bit(10))
> would yield '0001000000'.

Yes, and what will
Cast( Cast(42 as bit(32)) as bit(10))
yield? Unless you make the second cast truncate at the left, you'll get
ten zero bits out of this.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2003-04-23 15:34:18 Re: bit strings - anyone working on them?
Previous Message scott.marlowe 2003-04-23 15:27:04 Re: Are we losing momentum?