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

From Alvaro Herrera
Subject Re: bytea vs. pg_dump
Date
Msg-id 20090505144414.GM4476@alvh.no-ip.org
Whole thread Raw
In response to Re: bytea vs. pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> > Bernd Helmle <mailings@oopsware.de> wrote:
> >> Another approach would be to just dump bytea columns in binary
> >> format only (not sure how doable that is, though).
>  
> > If that's not doable, perhaps a base64 option for bytea COPY?
> 
> I'm thinking plain old pairs-of-hex-digits might be the best
> tradeoff if conversion speed is the criterion.  The main problem
> in any case would be to decide how to control the format option.

It would be great if COPY FROM could read some fields as binary while
the rest is text.  That would allow us to do something like

--bytea-column-format=binary
--bytea-column-format=hexpair
--bytea-column-format=text

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: bytea vs. pg_dump
Next
From: Bruce Momjian
Date:
Subject: Re: GiST index changes