Re: COPY questions

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: COPY questions
Дата
Msg-id 1234986667.11205.7.camel@dell.linuxdev.us.dell.com
обсуждение исходный текст
Ответ на COPY questions  (Bill Todd <pg@dbginc.com>)
Список pgsql-general
On Wed, 2009-02-18 at 11:56 -0700, Bill Todd wrote:
> If the COPY command fails does it identify the offending row?

Yes, it tries to identify the failing row in the error message.

> After reading the manual and the wiki I assume that there is no way to
> tell copy to start with the Nth record in the input file. Is that
> correct? It seems like such an obvious feature I was surprised not to
> find it. Thanks.

That's correct.

There are a lot of features that people could find useful: various
formats and various manipulations of the data before it's processed. If
all of those features were implemented, COPY would start to look more
like perl.

In general, it's best to preprocess the data yourself and pipe the
result to a "COPY ... FROM STDIN" command. That way you can actually use
perl if you want to.

Regards,
    Jeff Davis


В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Debugging custom type libraries
Следующее
От: "Brent Wood"
Дата:
Сообщение: Re: Appending \o output instead of overwriting the output file