Re: [HACKERS] bytea_output output of base64

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] bytea_output output of base64
Дата
Msg-id CA+Tgmoab-JR0DK6Z+U9-Xz=R8m-FSdSAPBrM0vyOPS3uuHHFxA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] bytea_output output of base64  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] bytea_output output of base64  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Mon, Feb 27, 2017 at 7:08 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 2/26/17 05:05, Robert Haas wrote:
>> That having been said, I do agree with Tom's point that we already
>> have one more bytea_output format than would be ideal.  To justify
>> implementing base64 as a third choice, it would have to not only be
>> better than hex, but enough better to justify the migration pain.  I'm
>> not sure whether it could clear that bar.
>
> Another point is that an "output" format is not the same as an
> "encoding" format.  An output format should be somewhat human-readable.
> Otherwise we could find all kinds of more compact output formats for
> different data types.  The hex format satisfies all of performance, ease
> of use, and readability pretty well, I think.

Depends. I'd argue that 'dog' is more readable than '\x646f67',
although I concede that the latter is easier for a human to decode
than 'ZG9n'.

The Matrix nonwithstanding, if your binary blobs contain things like
JPG images, you probably want to feed the blobs to something that can
render them as a picture, rather than trying to guess from either hex
or escape output whether you've got a blond, brunette, or redhead.  In
the case where you do happen to want your binary blob rendered as
ASCII, the optimal format probably depends on some mix of what the
underlying data is, what you plan to do with the result, and personal
preference.  I think we might as well argue about whether green is
better than yellow.

I don't think Bruce was seriously proposing a change in this area
anyway.  I think he was just asking a question.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] port of INSTALL file generation to XSLT
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: [HACKERS] Two questions about Postgres parser