Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B6D266365EC for ; Wed, 4 Nov 2009 18:11:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18708-03-7 for ; Wed, 4 Nov 2009 22:11:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id CE65E636491 for ; Wed, 4 Nov 2009 18:11:06 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id nA4MB5dP027334; Wed, 4 Nov 2009 17:11:05 -0500 (EST) To: Richard Broersma cc: sql pgsql Subject: Re: Learning about WITH RECURSIVE In-reply-to: <396486430911041403u639c750bn488ada60822448c0@mail.gmail.com> References: <396486430911041403u639c750bn488ada60822448c0@mail.gmail.com> Comments: In-reply-to Richard Broersma message dated "Wed, 04 Nov 2009 14:03:33 -0800" Date: Wed, 04 Nov 2009 17:11:04 -0500 Message-ID: <27333.1257372664@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.185 tagged_above=-10 required=5 tests=BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 200911/21 X-Sequence-Number: 33372 Richard Broersma writes: > Can anyone one explain why a "WITH RECURSIVE" query has the same > results regardless whether UNION or UNION ALL is specified? Well, if the rows are all different anyway, UNION isn't going to eliminate any ... regards, tom lane