Re: COPY as a set returning function

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: COPY as a set returning function
Дата
Msg-id CAMsr+YEmfEGsRTtfJKDs5Mtqg3CbU5Ao_-rdi0FBJPvJ3y4npQ@mail.gmail.com
обсуждение исходный текст
Ответ на COPY as a set returning function  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: COPY as a set returning function  (Corey Huinker <corey.huinker@gmail.com>)
Список pgsql-hackers
<p dir="ltr">On 15 Oct. 2016 04:56, "Corey Huinker" <<a
href="mailto:corey.huinker@gmail.com">corey.huinker@gmail.com</a>>wrote:<p dir="ltr">> I would like to make COPY
itselfa SRF. That's a bit beyond my capabilities, so if that is the route we want to go, I will need help.<br />
><br/> > The syntax would probably look like this (new bits in bold):<br /> ><br /> >> WITH my_copy  AS
(<br/> >>     COPY FROM 'example.csv' TO RESULT SET(c1 text, c2 integer, dummy1 text, dummy2 text, c5 date) WITH
(FORMATCSV)<br /> >>     RETURNING c1, c2, c3<br /> >> )<p dir="ltr">Strong -1 from me on this approach.
OurCTE implementation materializes everything so this is no better than COPYing to a temp table.<p dir="ltr">Not unless
youplan to fix that (and figure out the backward compatibility issues since the bug is documented as a feature) or
implementRETURNING in subqueries... I'd go for the function. 

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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [PATCH] pgpassfile connection option
Следующее
От: Jeff Janes
Дата:
Сообщение: postgres_fdw super user checks