Re: "COPY foo FROM STDOUT" and ecpg

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "COPY foo FROM STDOUT" and ecpg
Дата
Msg-id 2841.1361895814@sss.pgh.pa.us
обсуждение исходный текст
Ответ на "COPY foo FROM STDOUT" and ecpg  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: "COPY foo FROM STDOUT" and ecpg  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> While looking at Fujita Etsuro's patch to allow copy to/from a shell 
> command, I noticed that the grammar currently allows these:

> COPY foo FROM STDOUT
> COPY foo TO STDIN

> In other words, STDIN and STDOUT can be used completely interchangeably. 
> However, the ecpg grammar is more strict about that:

> ERROR: COPY TO STDIN is not possible

> Any particular reason for ecpg to check that, while the backend doesn't 
> care? I think we should just remove those checks from the ecpg grammar.

Agreed, but your draft patch doesn't do that completely.  It should only
make tests that correspond to what the error message says.  (I assume
the backend will bounce the other cases at some post-grammar stage.)
        regards, tom lane



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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: pg_xlogdump
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pg_xlogdump compile error