Re: Bulkloading using COPY - ignore duplicates?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bulkloading using COPY - ignore duplicates?
Дата
Msg-id 200201031824.g03IOQN23254@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Bulkloading using COPY - ignore duplicates?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Bulkloading using COPY - ignore duplicates?
Список pgsql-hackers
Bruce Momjian wrote:
> Tom Lane wrote:
> > > How about for TODO:
> > >     * Allow COPY to report error lines and continue; requires
> > >     nested transactions;  optionally allow error codes to be specified
> > 
> > Okay, that seems reasonable.
> 
> Good.  Now that I think of it, nested transactions don't seem required. 
> We already allow pg_dump to dump a database using INSERTs, and we don't
> put those inserts in a single transaction when we load them:
>     
>     CREATE TABLE "test" (
>             "x" integer
>     );
>     
>     INSERT INTO "test" VALUES (1);
>     INSERT INTO "test" VALUES (2);
> 
> Should we be wrapping these INSERTs in a transaction?  Can we do COPY
> with each row being its own transaction?

OK, added to TODO:
       o Allow COPY to report error lines and continue;  optionally          allow error codes to be specified

Seems nested transactions are not required if we load each COPY line in
its own transaction, like we do with INSERT from pg_dump.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Updated TODO item
Следующее
От: Brent Verner
Дата:
Сообщение: Re: More problem with scripts