Re: FOR UPDATE is not allowed in this context

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: FOR UPDATE is not allowed in this context
Дата
Msg-id 8766.982717138@sss.pgh.pa.us
обсуждение исходный текст
Ответ на FOR UPDATE is not allowed in this context  ("Postgres El Mejor" <postgres99@hotmail.com>)
Ответы Re: FOR UPDATE is not allowed in this context
Список pgsql-interfaces
"Postgres El Mejor" <postgres99@hotmail.com> writes:
> Greetings:
> When precompiling the following sentence the precompiler shows the message
> "FOR UPDATE is not allowed in this context".

> EXEC SQL SELECT camp_1 INTO :n1 WHERE llave = :var_llave FOR UPDATE;

This seems to me to be a bug in ecpg: the variable ForUpdateNotAllowed
doesn't get reset between statements.  If you experiment more you'll
probably find the behavior depends on the preceding statements.

That bug is gone in 7.1 by virtue of the fact that the variable doesn't
exist anymore ... but I think there are related bugs associated with
some other ad-hoc flags in the ecpg parser, none of which get reset at
what I would consider a reasonable place to reset them ...
        regards, tom lane


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

Предыдущее
От: "Postgres El Mejor"
Дата:
Сообщение: FOR UPDATE is not allowed in this context
Следующее
От: root
Дата:
Сообщение: C++ Question