Re: Add switches for DELIMITER and NULL in pg_dump COPY

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Add switches for DELIMITER and NULL in pg_dump COPY
Дата
Msg-id 87wtf4na2c.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Add switches for DELIMITER and NULL in pg_dump COPY  (David Fetter <david@fetter.org>)
Список 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 по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Running out of disk space during query
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Running out of disk space during query