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: 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: (view raw, whole thread or download thread mbox)
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


pgsql-interfaces by date

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

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