Re: is it possible to flush / commit / update underlying table during the COPY table FROM 'pipe'

Поиск
Список
Период
Сортировка
От Jon Jensen
Тема Re: is it possible to flush / commit / update underlying table during the COPY table FROM 'pipe'
Дата
Msg-id CB451BCE-8AC5-46F3-BAF4-CF0314C305C0@jenseng.com
обсуждение исходный текст
Ответ на is it possible to flush / commit / update underlying table during the COPY table FROM 'pipe'  (Trent George <trent.george1@gmail.com>)
Список pgsql-novice
On Mar 26, 2011, at 5:31 PM, Trent George wrote:

> Is it (or would it) be possible to allow some type of equivalent of
> BATCHSIZE as used in mssql BULK INSERT command
> This would group and commit this number of records during the import,
> while it is still running
> One could in theory use a value of =1, =1000 or leave the default (whole batch)

There is nothing built-in for what you describe, but you could accomplish the desired result on your end. e.g. split
theimport into batches of 1000 (or whatever) and issue individual COPY commands for each one. This could all be wrapped
intoa sh/perl/whatever script to make it reusable, configurable, add error handling, etc. 

Jon

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

Предыдущее
От: Trent George
Дата:
Сообщение: is it possible to flush / commit / update underlying table during the COPY table FROM 'pipe'
Следующее
От: Francisco Leovey
Дата:
Сообщение: Re: /etc/init.d/postgres-8.4-openscg start problem