Re: Tweaking bytea / large object block sizes?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Hanno Schlichting <hanno(at)hannosch(dot)eu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Tweaking bytea / large object block sizes?
Date: 2011-06-13 13:42:35
Message-ID: BANLkTimH5qA7X=AegQc-MBNR4yFC20KVNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 13, 2011 at 1:58 AM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-06-13 14:08:12 Re: setting up streaming error. Please help
Previous Message jonathansfl 2011-06-13 13:35:24 Re: Can't drop temp table in subfunction during cursor loop (being used by active queries)