Re: Better error message for a small problem with WITH RECURSIVE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Better error message for a small problem with WITH RECURSIVE
Date: 2008-10-08 12:46:01
Message-ID: 27556.1223469961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> What we can do is keep a list of "not yet parsed WITH-names" in ParseState,
>> and check through that list when about to fail for relation-not-found, and
>> issue a suitable message hinting that maybe you forgot RECURSIVE if we find
>> a match.

> Perhaps it would be sufficient to just check if we're inside a non-recursive
> WITH without bothering to check if the name matches?

Even knowing that would require most of the same changes I made to do
the full nine yards, I think. The previous ParseState info didn't
record anything at all that would allow parserOpenTable to know that
a non-recursive WITH is being examined.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-08 12:50:40 Re: Better error message for a small problem with WITH RECURSIVE
Previous Message Tom Lane 2008-10-08 12:42:19 Re: About postgresql8.3.3 build in MS VS2005