Re: A small bug in gram.y - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A small bug in gram.y
Date
Msg-id 6933.1257268171@sss.pgh.pa.us
Whole thread Raw
In response to Re: A small bug in gram.y  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: A small bug in gram.y
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Uh, why?  It looks like it's complaining about the constant 123,
>> not about the operator.
> I wrote that before I saw your post, which left me ambivalent.  My
> thinking was that it seems clearest to me when it points to the token
> at which things become untenable.

Our error pointers are *not* about how far to the right did parsing
get, they're about which part of the construct seems to be most
directly related to the problem.  Otherwise most of them would point
at the ending semicolon ;-).  A possibly less flippant example is
select nosuchfunction(1,2,3,avalidfunction(4));              ^
select nosuchfunction(1,2,3,avalidfunction(4));                                                    ^

Which of these is less likely to be misread about which function is
being complained of?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: A small bug in gram.y
Next
From: Tom Lane
Date:
Subject: Re: operator exclusion constraints