RE: (7.1) BIT datatype - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject RE: (7.1) BIT datatype
Date
Msg-id NEBBIOAJBMEENKACLNPCAELMCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to (7.1) BIT datatype  ("Oliver Elphick" <olly@lfix.co.uk>)
Responses Re: (7.1) BIT datatype  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
> Some SQL92 functionality is missing from the BIT and VARBIT types.
>
> It should be possible to enter hexadecimal values as:
>
>   B'[<bit>...]'[{<separator>...'[<bit...]'}...]
>   X'[<hexdigit>...]'[{<separator>...'[<hexdigit...]'}...]
>
> (Cannan and Otten: SQL - The Standard Handbook, p.38)
>
> but the hexadeximal form is not accepted.


I have been using the BIT and VARBIT types in Postgres 7.0.3 (undocumented I
believe), and I note that the _input_ format is as follows:

update blah set flags='b101001';  -- Binary
update blah set flags='xff45';  -- Hex

But the _output_ format (for varbit) is always:

B'1010110'

Has any of this changed in 7.1?

Chris



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: RE: Inline Comments for pg_dump
Next
From: "Oliver Elphick"
Date:
Subject: Re: (7.1) BIT datatype