Re: proposal: psql \setfileref

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: psql \setfileref
Дата
Msg-id CAFj8pRBZYUVn5eGiADVY2LBDk6+9pjgKq5dZ5Vq64Y4Rt2yz=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: psql \setfileref  (Corey Huinker <corey.huinker@gmail.com>)
Ответы Re: proposal: psql \setfileref  (Corey Huinker <corey.huinker@gmail.com>)
Список pgsql-hackers


2016-10-09 19:14 GMT+02:00 Corey Huinker <corey.huinker@gmail.com>:
On Sun, Oct 9, 2016 at 12:12 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:


2016-10-09 17:27 GMT+02:00 Corey Huinker <corey.huinker@gmail.com>:
here is new update - some mentioned issues are fixed + regress tests and docs


 
This might tie into some work I'm doing. Is there any way these filerefs could be used as the inline portion of a COPY command?
i.e. like this:

COPY my_table FROM STDIN
:file_ref
\.



I understand, but I am not sure how difficult implementation it is. This part (COPY input) doesn't support parametrization - and parametrization can have a negative performance impact.

Regards


I may not understand your response. I was thinking we'd want :file_ref to simply 'cat' the file (or program) in place. The fact that the output was consumed by COPY was coincidental. Does that chance your response?

look to code - some parts allows psql session variables, some not - I can use variables in statements - not in data block.

More, there is ambiguity - :xxx should not be part of SQL statement (and then psql variables are possible), but :xxxx should be part of data.

Regards

Pavel
 





 

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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Re: proposal: psql \setfileref
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: proposal: psql \setfileref