WIP: extend parser to show error locations in more cases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: WIP: extend parser to show error locations in more cases
Date: 2008-09-01 03:26:14
Message-ID: 3543.1220239574@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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

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 Content-Type Size
more-error-locations-2.patch.gz application/octet-stream 29.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2008-09-01 03:42:08 Re: rmgr hooks and contrib/rmgr_hook
Previous Message Hitoshi Harada 2008-09-01 03:15:19 Re: Window functions patch v04 for the September commit fest