Re: bit type external representation - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: bit type external representation
Date
Msg-id 3D33BB58.893BA2F9@fourpalms.org
Whole thread Raw
In response to bit type external representation  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-hackers
> > 1) the SQL standard says what hex values should be translated to in
> > binary, which implies that all values may be *output* in binary format.
> So the standard says both represent a fixed-length bit string data type.
> ISTM that we should not try to preserve any information on the units
> used for input, and that both should be output in the same way.

OK, that's how I read it too. I'll work on making it behave with hex
input and not worry about the output, which takes care of itself.

I also notice that the following has trouble:
 thomas=# select bit '1010'; ERROR:  bit string length does not match type bit(1)

which is similar to the very recent problem with fixed-length character
strings. I've got patches to fix this one too.
                     - Thomas


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [SQL] line datatype
Next
From: Tom Lane
Date:
Subject: Re: pg_views.definition