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

From Peter Eisentraut
Subject Re: bit strings - anyone working on them?
Date
Msg-id Pine.LNX.4.44.0304231658550.1676-100000@peter.localdomain
Whole thread Raw
In response to Re: bit strings - anyone working on them?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bit strings - anyone working on them?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Tom Lane writes:

> Is there a way out of this?  I'm not sure.  I don't think that the SQL
> spec's bitstring definitions are really intended to allow sensible
> mappings to integer values --- so maybe there is no way to satisfy the
> spec and have natural integer mappings at the same time.

They are "bit strings" after all, not binary numbers.  If you need a
binary number, use any numeric type and format the input and output
accordingly.

As for converting between bit strings and numbers, maybe we should make
pairs of explicit functions that assume one bit order or another, and
remove the casts.

All things considered, it was probably a good idea that they removed bit
strings in SQL200x.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: bit strings - anyone working on them?
Next
From: Barry Lind
Date:
Subject: Re: First draft of new FE/BE protocol spec posted for comments