Re: BUG #4550: ecpg problem with copy command and hostvar

Поиск
Список
Период
Сортировка
От Clemens A. Fischer
Тема Re: BUG #4550: ecpg problem with copy command and hostvar
Дата
Msg-id 1227708144.3280.12.camel@linux2-cfi.dhcp.internal
обсуждение исходный текст
Ответ на Re: BUG #4550: ecpg problem with copy command and hostvar  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-bugs
Hallo Michael,

Am Mittwoch, den 26.11.2008, 14:49 +0100 schrieb Michael Meskes:
> On Tue, Nov 25, 2008 at 12:28:38PM +0000, Clemens Fischer wrote:
> > The copy command can't be used with a hostvar.
>
> This is essentially the answer. The major difference between the ecpg version
> of PostgreSQL 8.2 and 8.3 is that the 8.3 version uses the backend supplied
> prepare/execute facility instead of just simulating this feature. Part of this
> change was to change the variable handling and no longer construct strings on
> the client side but pass the variables to the backend directly. But there is no
> way to pass a variable filename for the copy command AFAIK. Or in other words,
> the old versions had a bug in that they accepted a variable there.
>
> Can you use EXECUTE and put the whole statement into a variable instead?
I switched to EXECUTE yesterday. It works.
>
> Michael
Thank you

Clemens

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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: BUG #4550: ecpg problem with copy command and hostvar
Следующее
От: "Clemens A. Fischer"
Дата:
Сообщение: Re: BUG #4549: ecpg produces code that don't compile