Re: Possible Bug in 9.2beta3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam Mackler <adammackler(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Possible Bug in 9.2beta3
Date: 2012-08-15 23:18:03
Message-ID: 25078.1345072683@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Adam Mackler <adammackler(at)gmail(dot)com> writes:
> On Wed, Aug 15, 2012 at 12:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Right offhand I'm inclined to think that the reference to "iter"
>> inside the first sub-WITH ought to be disallowed. I don't recall
>> the exact rules about where a recursive reference can appear, but
>> it sure doesn't seem like that ought to be OK, does it?

> Are you asking me or the other experts?

More the latter. The verbiage in SQL:2008 7.13 <query expression>
syntax rule 2) g) is sufficiently dense that it's not easy to tell
what they're forbidding, and as usual with the SQL committee, no word
of rationale shall escape their lips. So I have no idea whether these
restrictions are really logically necessary to ensure a predictable
result, or they just represent the lowest common denominator of the
implementations written by the companies with seats on the committee.
But it sort of looks like subrule iii) 3) restricts the recursive
reference to appear in the main body of the subquery, not in a WITH
attached to it.

Be that as it may, our implementation seems to be able to cope with it;
the issue that we had here was pretty easily resolvable once I'd traced
through the execution. Patch is committed, though too late for this
week's releases.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-08-16 00:19:49 Re: BUG #7498: Questionable interval parsing when in the form 'n m days'
Previous Message Bruce Momjian 2012-08-15 23:11:42 Re: [BUGS] BUG #6184: Inconsistencies in log messages