Skip site navigation (1) Skip section navigation (2)

Re: FOR UPDATE is not allowed in this context

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Postgres El Mejor" <postgres99(at)hotmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: FOR UPDATE is not allowed in this context
Date: 2001-02-21 00:58:58
Message-ID: 8766.982717138@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
"Postgres El Mejor" <postgres99(at)hotmail(dot)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

In response to

Responses

pgsql-interfaces by date

Next:From: rootDate: 2001-02-21 05:11:05
Subject: C++ Question
Previous:From: Postgres El MejorDate: 2001-02-21 00:16:46
Subject: FOR UPDATE is not allowed in this context

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group