Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

Поиск
Список
Период
Сортировка
От Daniel Farina
Тема Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION
Дата
Msg-id 429f3b220911231606o51f03279ye7736d084576bda9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION  (Daniel Farina <dfarina@truviso.com>)
Список pgsql-hackers
On Mon, Nov 23, 2009 at 4:03 PM, Daniel Farina <dfarina@truviso.com> wrote:
> Yes.  Take a look at the tests introduced to core PostgeSQL (see patch
> 2), where instead of returning a text[] I return just a single text of
> the verbatim output of the copy.  You could imagine making that an SRF
> instead.  It would have to understand COPY row delimiters in whatever
> mode you were operating in, though.

Actually, sorry, I lie, but not in a bad way....  Since COPY operates
row at a time (rather than a stream of bytes with arbitrary
boundaries) you could rely on being passed each record one-at-a-time.
You don't have to understand the delimiter.  So you could even make a
bytea[][] that even contains the binary output, the first dimension
being row number, the second being the bytes themselves.  The header
would pose an interesting problem, though.

fdr


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

Предыдущее
От: Daniel Farina
Дата:
Сообщение: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION