Re: bit strings - anyone working on them? - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: bit strings - anyone working on them?
Date
Msg-id 20030422072516.U67223-100000@megazone23.bigpanda.com
Whole thread Raw
In response to bit strings - anyone working on them?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
On Tue, 22 Apr 2003, Philip Warner wrote:

> Having just used bit strings for the first time, I am now aware of some
> features I consider a little odd, and was wondering if (a) they are
> actively being worked on, (b) if they are not considered the way to go, and
> (c) if there would be any interest in the additions/changes indicated below.
>
> 1. Length enforcement:
> ----------------------
>
>      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.

ISTM that the answer would be closer to B'10' according to the spec.  The
spec asks for right extension by 0 when casting to a larger size fixed bit
string.

> 3. extract_bits
> ---------------
>
>      extract_bits(varbit bits, int from, int to) returns varbit
>
> would seem useful.

I think substring is the way to do this.



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: bit strings - anyone working on them?
Next
From: Tilo Schwarz
Date:
Subject: Re: Are we losing momentum?