pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Postgres El Mejor <postgres99@hotmail.com>
Cc: pgsql-interfaces@postgresql.org, Michael Meskes <meskes@postgresql.org>
Subject: Re: FOR UPDATE is not allowed in this context
Date: Tue, 20 Feb 2001 19:58:58 -0500
Message-ID: <8766.982717138@sss.pgh.pa.us> (raw)
In-Reply-To: <F76sa7qEqlehFvHkQFY00003779@hotmail.com>
References: <F76sa7qEqlehFvHkQFY00003779@hotmail.com>

"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



view thread (8+ messages)  latest in thread

Message-ID: <8766.982717138@sss.pgh.pa.us>
Permalink:  ../8766.982717138@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8766.982717138@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgres99@hotmail.com, meskes@postgresql.org
  Subject: Re: FOR UPDATE is not allowed in this context
  In-Reply-To: <8766.982717138@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox