Re: Better error message for a small problem with WITH RECURSIVE - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Better error message for a small problem with WITH RECURSIVE
Date
Msg-id 874p3nhbvl.fsf@oxford.xeocode.com
Whole thread Raw
In response to Better error message for a small problem with WITH RECURSIVE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Better error message for a small problem with WITH RECURSIVE
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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.
>
> I would think this is overkill, except I've made the same darn mistake
> one time too many.  It seems clear to me that a lot of other people will
> make it too, and if the error message isn't more helpful a lot of time
> will get wasted.  Barring loud objections, I'm gonna go change it.

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

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication
support!


pgsql-hackers by date:

Previous
From: iihero
Date:
Subject: Re: About postgresql8.3.3 build in MS VS2005
Next
From: Grzegorz Jaskiewicz
Date:
Subject: Re: query path, and rules