Re: [HACKERS] bytea_output output of base64 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] bytea_output output of base64
Date
Msg-id 17912.1487894798@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] bytea_output output of base64  (David Fetter <david@fetter.org>)
List pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Thu, Feb 23, 2017 at 05:55:37PM -0500, Bruce Momjian wrote:
>> Is there a reason we chose hex over base64?

> Whether there was or not, there's not a compelling reason now to break
> people's software.  When people want compression, methods a LOT more
> effective than base64 are common.  Gzip, for example.

Yeah.  I think the argument for hex was about readability.  It's certainly
not more compact than the traditional "escape" format --- and depending on
what your data is like, base64 probably wouldn't be either.

If you want small, you'd go for binary transmission first, and then maybe
gzip it.

I really don't see any compelling argument for base64 except possibly
exchangability with other systems.  But if we stuck a header on it, which
I think we'd have to do to make it reliably distinguishable from the other
bytea formats, that argument goes down the drain.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: [HACKERS] \if, \elseif, \else, \endif (was Re: PSQL commands:\quit_if, \quit_unless)
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] bytea_output output of base64