COPY FROM STDIN

Поиск
Список
Период
Сортировка
От Luke Coldiron
Тема COPY FROM STDIN
Дата
Msg-id BAY179-W863CD0E32E9CC2FF3F4A5DC6F20@phx.gbl
обсуждение исходный текст
Ответы Re: COPY FROM STDIN
Список pgsql-general
Is there a way to achieve the performance of the COPY FROM STDIN command within a C extension function connected to the db connection that called the C function? I have text that I would like to receive as input to a C function that contains many COPY command statements in the file that would be parsed similar to how psql would handle the file but I don't want to shell out to psql as I need to do all of this work on the db connection that the function was called from as there are other commands that I need to perform as well after before and after handling the COPY commands on this same connection. I would like the unit of work to be all or nothing and have the performance of the COPY FROM STDIN command and not break things out into SELECT INTO or INSERT statements for performance.

Ideally I would like to be able to attach to the calling db connection via SPI_connect() and then use the libpq library to issue the copy commands via PQputCopyData, PQputCopyEnd.

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Shared system resources
Следующее
От: subhan alimy
Дата:
Сообщение: Re: PostgreSQL GUI tools