Re: bit strings - anyone working on them?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
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 14:36:15
Message-ID: 20030422072516.U67223-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message pgsql 2003-04-22 14:45:11 Re: For the ametures. (related to 'Are we losing momentum?')
Previous Message Christopher Kings-Lynne 2003-04-22 14:32:29 Re: bit strings - anyone working on them?