Re: Add switches for DELIMITER and NULL in pg_dump COPY - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Add switches for DELIMITER and NULL in pg_dump COPY
Date
Msg-id 87wtf4na2c.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Add switches for DELIMITER and NULL in pg_dump COPY  (David Fetter <david@fetter.org>)
List pgsql-hackers
David Fetter <david@fetter.org> writes:

> Not everybody's editor/mailer/whatever does this right, and it makes
> things fragile.  Another way to do this is to change the delimter to a
> printable character like '|', but that raises hackles, too.

Frankly if you're passing you data through an editor/mailer/whatever you don't
trust then your setup is already fragile. At least if you're using tabs then
you find out about these problems. Tiptoeing around the untrustworthy process
just means that it'll fail randomly (and unpredictably) when other characters
appear in the data that the software doesn't handle.

There are certainly cases where you'll need to do this to interface with other
(amateurish) software. But pg_dump isn't for that at all. Even COPY isn't a
general purpose data formatter. To interface with other software not using a
standard format you're going to have to pass the data through Perl or
something like that anyways.

--
greg

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Running out of disk space during query
Next
From: Simon Riggs
Date:
Subject: Re: Running out of disk space during query