Re: FOR UPDATE is not allowed in this context

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: FOR UPDATE is not allowed in this context
Date: 2001-02-21 19:03:00
Message-ID: 11485.982782180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Michael Meskes <meskes(at)postgresql(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message J. T. Vermeulen 2001-02-21 19:27:41 Re: Patches for libpq++
Previous Message Bruce Momjian 2001-02-21 18:53:30 Re: Patches for libpq++