Re: Bit strings

Поиск
Список
Период
Сортировка
От Adriaan Joubert
Тема Re: Bit strings
Дата
Msg-id 39408819.A4BA8A38@albourne.com
обсуждение исходный текст
Ответ на Re: Bit strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Bit strings  (Peter Eisentraut <peter_e@gmx.net>)
Re: Bit strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: Sigh, LIKE indexing is *still* broken in foreign locales
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Sigh, LIKE indexing is *still* broken in foreign locales