Re: FOR UPDATE is not allowed in this context - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: FOR UPDATE is not allowed in this context
Date
Msg-id 11485.982782180@sss.pgh.pa.us
Whole thread Raw
In response to Re: FOR UPDATE is not allowed in this context  (Michael Meskes <meskes@postgresql.org>)
Responses Re: FOR UPDATE is not allowed in this context  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
Michael Meskes <meskes@postgresql.org> writes:
> On Tue, Feb 20, 2001 at 07:58:58PM -0500, Tom Lane wrote:
>> ... 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 ...

> Which one do you think of? I agree that some of this stuff is just a hack I
> needed to get that check into the parser. But so far I have yet to see a bug
> reported on these. Except for the one we are talking about of course.

Well, for example, once a CREATE RULE has been seen, ecpg will accept
'old' and 'new' in all subsequent statements, because QueryIsRule is
never reset.  FoundInto is reset, but in the wrong place, meaning that
"CREATE TABLE/AS SELECT may not specify INTO" might be triggered
inappropriately, or not triggered when it's supposed to be.

My advice would be to eliminate both variables and leave it to the
backend to make the corresponding error checks.

BTW, I just committed some ecpg changes to modify the way
case-conversion of keywords is done, to keep it in line with the
backend.  You'd said you wanted notification of such things ...
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patches for libpq++
Next
From: "J. T. Vermeulen"
Date:
Subject: Re: Patches for libpq++