Re: Tweaking bytea / large object block sizes? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Tweaking bytea / large object block sizes?
Date
Msg-id BANLkTimH5qA7X=AegQc-MBNR4yFC20KVNg@mail.gmail.com
Whole thread Raw
In response to Re: Tweaking bytea / large object block sizes?  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Mon, Jun 13, 2011 at 1:58 AM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> On 13/06/11 09:27, Merlin Moncure wrote:
>
>> want to use the binary protocol mode (especially for postgres versions
>> that don't support hex mode)
>
> Allowing myself to get a wee bit sidetracked:
>
> I've been wondering lately why hex was chosen as the new input/output
> format when the bytea_output change went in. The Base64 encoding is
> trivial to implement, already supported by standard libraries for many
> languages and add-ons for the rest, fast to encode/decode, and much more
> compact than a hex encoding, so it seems like a more attractive option.
> PostgreSQL already supports base64 in explicit 'escape()' calls.

yeah -- I remember the discussion.  I think the bottom line is that
hex is just simpler all around.  This conveys a number of small
advantages that, when added up, outweigh the slightly better space
efficiency.

merlin

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: determine client os
Next
From: Tom Lane
Date:
Subject: Re: setting up streaming error. Please help