Re: bytea vs. pg_dump - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: bytea vs. pg_dump
Date
Msg-id 200907080058.08948.peter_e@gmx.net
Whole thread Raw
In response to Re: bytea vs. pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: bytea vs. pg_dump
List 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?

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: *_collapse_limit, geqo_threshold
Next
From: Tom Lane
Date:
Subject: Re: bytea vs. pg_dump