| От | Tom Lane |
|---|---|
| Тема | Re: Bulk data insertion |
| Дата | |
| Msg-id | 20283.1101512814@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bulk data insertion (Jonathan Daugherty <jdaugherty@commandprompt.com>) |
| Список | pgsql-general |
Jonathan Daugherty <jdaugherty@commandprompt.com> writes:
> The problem is that I don't want to spend a lot of time and memory
> building such a query (in C). I would like to know if there is a way to
> take this huge chunk of data and get it into the database in a less
> memory-intensive way. I suppose I could use COPY to put the data into a
> table with triggers that would do the checks on the data, but it seems
> inelegant and I'd like to know if there's a better way.
Actually I'd say that is the elegant way. SQL is fundamentally a
set-oriented (table-oriented) language, and forcing it to do things in
an array fashion is just misusing the tool.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера