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: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bit strings - anyone working on them?
Date: 2003-04-22 15:31:43
Message-ID: 3110.1051025503@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:
> select B'10' | B'1';
> is currently illegal.

> ISTM we should return B'11' for this. ie. build the smallest varbit that
> contains the result, and return it.

Why would that be the correct answer and not B'10' --- ie, which end of
the shorter string should get padded? If anything I'd expect to see
padding added on the right.

> Doesn't seem too unreasonable to support varbit<->numeric conversions.

Aren't those there already for conversions to/from int4 and int8? What
else would you want?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2003-04-22 15:51:56 Re: bit strings - anyone working on them?
Previous Message Tom Lane 2003-04-22 15:18:45 Re: For the ametures. (related to "Are we losing momentum?")