WIP: extend parser to show error locations in more cases - Mailing list pgsql-hackers

From Tom Lane
Subject WIP: extend parser to show error locations in more cases
Date
Msg-id 3543.1220239574@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
This is the threatened second pass at reporting parse error locations.
It makes the majority of the ereport's in backend/parser/ include an
error location.  It's not quite ready to apply, mainly because I haven't
prepared updated regression test outputs yet (something like 45 out of
the 115 existing tests will need changes, plus no doubt parts of
contrib).

There are some exceedingly useful (IMHO) improvements here --- for
example, if you have an aggregate in an illegal place, it'll point
right at the aggregate instead of just telling you there is one.
In a complex query with multiple levels of subquery this is not always
such an easy thing to know.

The main areas that are still lacking location information are errors
involving relation aliases and FOR UPDATE/FOR SHARE clauses.  I'm not
all that excited about those cases, and I'm running out of time before
September commit fest; so barring objection I'm going to clean up and
commit what I have.

            regards, tom lane


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Cleanup of GUC units code
Next
From: "Hitoshi Harada"
Date:
Subject: Re: Window functions patch v04 for the September commit fest