Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 3F045C7DB12 for ; Mon, 19 Mar 2012 15:51:56 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S9hgM-0005qF-BK for pgsql-hackers@postgresql.org; Mon, 19 Mar 2012 18:51:55 +0000 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 q2JIpTnW016292; Mon, 19 Mar 2012 14:51:29 -0400 (EDT) To: Andres Freund , pgsql-hackers@postgresql.org cc: Thom Brown , Dimitri Fontaine Subject: Re: Command Triggers, patch v11 In-reply-to: <20905.1331931287@sss.pgh.pa.us> References: <201203041650.39826.andres@anarazel.de> <20905.1331931287@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 16 Mar 2012 16:54:47 -0400" Date: Mon, 19 Mar 2012 14:51:29 -0400 Message-ID: <16291.1332183089@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/1233 X-Sequence-Number: 205115 I wrote: > One thing I soon found is that it lacks support for EXPLAIN SELECT INTO. While I'm not particularly excited about fixing PREPARE ... SELECT INTO or CREATE RULE ... SELECT INTO, I've come to the conclusion that the EXPLAIN case is a must-fix. Because not only is EXPLAIN SELECT INTO broken, but so is EXPLAIN CREATE TABLE AS, and the latter functionality is actually documented. So presumably somebody went out of their way to make this work, at some point. Since I've got the table-creation code moved into intorel_startup, this doesn't look to be that painful, but it will require an API change for ExplainOnePlan, which is slightly annoying because that's probably in use by third-party plugins. We could either break them obviously (by adding an explicit parameter) or break them subtly (by adding an ExplainState field they might forget to initialize). The former seems preferable. regards, tom lane