Re: Ragged CSV import

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Ragged CSV import
Дата
Msg-id 23048.1252591763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Ragged CSV import  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Ragged CSV import  (Hannu Krosing <hannu@2ndQuadrant.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I am fuzzy on the implementation details for making COPY act as a data
> source for INSERT/SELECT though.  I had thought to make EXPLAIN a data
> source, but it turned out not to be possible (as far as I could tell)
> without making EXPLAIN a fully-reserved word, which you vetoed.  It
> seems likely that COPY will present similar issues, though I haven't
> tried.

IIRC the previous discussion touched on making it look like a
set-returning function, although this would be a shade less convenient
for option parsing etc.

> I am also wondering what happens when someone embeds multiple COPY
> statements in a single query, or sticks one inside of a CTE or on the
> inner side of a left join.

Yeah, it would need to be restricted somehow.  A straight SRF function
would materialize its result, but I doubt we want that to happen for
COPY.

(This brings up the whole question of performance impact, which would
have to be thought about and minimized.)
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: RfD: more powerful "any" types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Ragged CSV import