pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Mackler <adammackler@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Possible Bug in 9.2beta3
Date: Wed, 15 Aug 2012 19:18:03 -0400
Message-ID: <25078.1345072683@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFC21Lp1qOfDdd7zVat3=xmGUeWGJirKixKBL_a9aob+VrKFKA@mail.gmail.com>
References: <20120813181700.GA45401@bk.macklerlaw.com>
	<8039.1345049624@sss.pgh.pa.us>
	<CAFC21Lp1qOfDdd7zVat3=xmGUeWGJirKixKBL_a9aob+VrKFKA@mail.gmail.com>

Adam Mackler <adammackler@gmail.com> writes:
> On Wed, Aug 15, 2012 at 12:53 PM, Tom Lane <tgl@sss.pgh.pa.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




view thread (5+ messages)

Message-ID: <25078.1345072683@sss.pgh.pa.us>
Permalink:  ../25078.1345072683@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25078.1345072683@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, adammackler@gmail.com
  Subject: Re: Possible Bug in 9.2beta3
  In-Reply-To: <25078.1345072683@sss.pgh.pa.us>
  References: <20120813181700.GA45401@bk.macklerlaw.com> <8039.1345049624@sss.pgh.pa.us> <CAFC21Lp1qOfDdd7zVat3=xmGUeWGJirKixKBL_a9aob+VrKFKA@mail.gmail.com> <25078.1345072683@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox