Re: bit strings - anyone working on them?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, 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 17:55:57
Message-ID: Pine.LNX.4.44.0304231658550.1676-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-04-23 17:56:52 Re: CLOSE command tag
Previous Message Barry Lind 2003-04-23 17:54:58 Re: First draft of new FE/BE protocol spec posted for comments