Re: Bit strings - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Bit strings
Date
Msg-id 200010030321.XAA04758@candle.pha.pa.us
Whole thread Raw
In response to Re: Bit strings  (Adriaan Joubert <a.joubert@albourne.com>)
Responses Re: Bit strings
List pgsql-hackers
Can someone comment on this?

> Bruce Momjian wrote:
> 
> > Can we get the BIT type working now that 7.1 is branched?
> >
> 
> Yep. We never quite finished the discussions before the 7.0 release. The
> outstanding issues were
> 
> 1) should bit operations be allowed between bit strings of different sizes?
> They are at the moment, but the longest string is truncated, as you
> otherwise get illogical behaviour (imagine padding with zeros and doing an
> XOR). Truncation can be somewhat unlogical as well. My current feeling is
> that perhaps it would be better to just disallow bit operations on
> bitstrings that haven't got the same length completely. Makes the code
> easier anyway ;-)
> 
> 2) A second point brought up by Peter is the conversion of bit-strings to
> integers and vice-versa. Postgres does not have unsigned ints, so it can
> lead to somewhat surprising behaviour. Implicit conversion is probably out
> of the question. So what type of conversion functions would people like to
> see, if any?
> 
> 3) With TOAST bit strings could be used to store large amounts of binary
> data. Don mentioned MIME-encoded strings for I/O. Is this useful? I guess
> and advantage is that BIT is an SQL type, but I'm not sure that any such
> application would be particularly portable. It doesn't look like a lot of
> extra work though, (provided somebody has got some MIME en-/decoding code
> lying about) so we could add it. Am i right that with TOAST and no
> restrictions on the query-buffer lengths in psql one could then upload mime
> objects straight into postgres?
> 
> So, what do people think?
> 
> Adriaan
> 
> 


--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: off-topic: (sorta) freebsd -> oracle, lightweight
Next
From: Bruce Momjian
Date:
Subject: Re: Proposal: TRUNCATE TABLE table RESTRICT