Gripe: bytea_output default => data corruption

Поиск
Список
Период
Сортировка
От ljb
Тема Gripe: bytea_output default => data corruption
Дата
Msg-id i92v0d$qfe$1@news.hub.org
обсуждение исходный текст
Ответы Re: Gripe: bytea_output default => data corruption  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
Defaulting bytea output from the backend to use hex mode encoding, which is
incompatible with pre-9.0 interfaces, wasn't a friendly thing to do. The
default should have been escape mode. Or else you needed a big warning in
HISTORY that we must either change bytea_output, or upgrade all clients
before servers. Because using a 9.0 server with a 8.x libpq-based client
results in undetected data corruption when selecting BYTEA objects.

By default, the 9.0 server encodes a bytea using hex mode, but an 8.x
libpq-based client will decode that using escape mode, with no error detected
on either end. For example, start with "A", encode to "\x40" decode to "x40".

There are good reasons to break backward compatibility, like security or
standards compliance, but not performance.  Please think twice next time you
consider breaking stuff just because you think the new way should be faster.

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

Предыдущее
От: sunpeng
Дата:
Сообщение: Re: are there any method that "Update" command not affect other unrelated indices?
Следующее
От: Satoshi Nagayasu
Дата:
Сообщение: Re: NoSQL -vs- SQL