Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLJyZ-000741-0w for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Feb 2015 23:12:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YLJyY-0001rA-Do for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Feb 2015 23:12:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLJyX-0001r4-Ph for pgsql-bugs@postgresql.org; Tue, 10 Feb 2015 23:12:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLJyV-0008CO-1Q for pgsql-bugs@postgresql.org; Tue, 10 Feb 2015 23:12:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t1ANC8tt002883; Tue, 10 Feb 2015 18:12:08 -0500 From: Tom Lane To: moe1234512345@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12760: Lateral files with more than 2 laterals In-reply-to: <20150210224138.18788.34504@wrigleys.postgresql.org> References: <20150210224138.18788.34504@wrigleys.postgresql.org> Comments: In-reply-to moe1234512345@gmail.com message dated "Tue, 10 Feb 2015 22:41:38 +0000" Date: Tue, 10 Feb 2015 18:12:08 -0500 Message-ID: <2882.1423609928@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org moe1234512345@gmail.com writes: > set geqo_threshold = 2; > SELECT * > FROM generate_series(1, 1) A, > lateral ( SELECT B from generate_series(1, 1) B where B = A limit 1 ) AS > B0, > lateral ( SELECT C from generate_series(1, 1) C where C = A and C != B limit > 1 ) AS C0 It's a good idea to show what problem you're seeing, though in this case I didn't have much trouble reproducing it: regression=# SELECT * FROM generate_series(1, 1) A, lateral ( SELECT B from generate_series(1, 1) B where B = A limit 1 ) AS B0, lateral ( SELECT C from generate_series(1, 1) C where C = A and C = B limit 1 ) AS C0; ERROR: failed to join all relations together Will look, thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs