Re: bytea vs. pg_dump

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, "Bernd Helmle" <mailings(at)oopsware(dot)de>
Subject: Re: bytea vs. pg_dump
Date: 2009-07-07 21:58:07
Message-ID: 200907080058.08948.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 06 May 2009 18:47:57 Tom Lane wrote:
> So the ambiguous-input problem is solved if we define the new format(s)
> to be started by backslash and something that the old code would reject.
> I'd keep it short, like "\x", but there's still room for multiple
> formats if anyone really wants to go to the trouble.

Here is a first cut at a new hex bytea input and output format. Example:

SET bytea_output_hex = true;

SELECT E'\\xDeAdBeEf'::bytea;
bytea
------------
\xdeadbeef
(1 row)

Bernd did some performance testing for me, and it looked pretty good.

Questions:

Should this be the default format?

Should the configuration parameter be a boolean or an enum, opening
possibilities for other formats?

Attachment Content-Type Size
bytea-format.patch text/x-patch 12.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-07 22:07:08 Re: bytea vs. pg_dump
Previous Message Kevin Grittner 2009-07-07 21:56:54 Re: *_collapse_limit, geqo_threshold