Re: COPY (query) TO file

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: COPY (query) TO file
Дата
Msg-id 87ejy7dyda.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: COPY (query) TO file  (Tino Wildenhain <tino@wildenhain.de>)
Ответы Re: COPY (query) TO file  (PFC <lists@peufeu.com>)
Список pgsql-hackers
Tino Wildenhain <tino@wildenhain.de> writes:

> Tom Lane wrote:
> > Tino Wildenhain <tino@wildenhain.de> writes:
> >> Ok, but why not just implement this into pg_dump or psql?
> >> Why bother the backend with that functionality?
> > 
> > You're not seriously suggesting we reimplement evaluation of WHERE clauses
> > on the client side, are you?

No, he's suggesting the client implement COPY formatting after fetching a
regular result set.

Of course this runs into the same problem other clients have dealing with
large result sets. libpq doesn't want to let the client deal with partial
results so you have to buffer up the entire result set in memory.

I was also vaguely pondering whether all the DDL commands could be generalized
to receive or send COPY formatted data for repeated execution. It would be
neat to be able to prepare an UPDATE with placeholders and stream data in COPY
format as parameters to the UPDATE to execute it thousands or millions of
times without any protocol overhead or network pipeline stalls.

-- 
greg



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: More thoughts about planner's cost estimates
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: More thoughts about planner's cost estimates