Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1E96C14F420B for ; Sun, 18 Mar 2012 22:16:46 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S9RDH-0002pj-PM for pgsql-hackers@postgresql.org; Mon, 19 Mar 2012 01:16:45 +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 q2J1GQRX024507; Sun, 18 Mar 2012 21:16:27 -0400 (EDT) To: Peter Eisentraut cc: Andres Freund , pgsql-hackers@postgresql.org, Thom Brown , Dimitri Fontaine Subject: Re: Command Triggers, patch v11 In-reply-to: <1332107267.6915.2.camel@vanquo.pezone.net> References: <201203162237.38813.andres@anarazel.de> <21818.1331934775@sss.pgh.pa.us> <201203162317.43818.andres@anarazel.de> <7094.1331996567@sss.pgh.pa.us> <9503.1332006327@sss.pgh.pa.us> <24814.1332021870@sss.pgh.pa.us> <1332107267.6915.2.camel@vanquo.pezone.net> Comments: In-reply-to Peter Eisentraut message dated "Sun, 18 Mar 2012 23:47:47 +0200" Date: Sun, 18 Mar 2012 21:16:26 -0400 Message-ID: <24506.1332119786@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/1209 X-Sequence-Number: 205091 Peter Eisentraut writes: > On lör, 2012-03-17 at 18:04 -0400, Tom Lane wrote: >> I'm not sure what we should do instead. We have gotten push-back before >> anytime we changed the command tag for an existing command (and in fact >> it seems that we intentionally added the rowcount display in 9.0, which >> means there are people out there who care about that functionality). >> On the other hand, the traditional output for CREATE TABLE AS doesn't >> seem to satisfy the principle of least astonishment. A third >> consideration is that if we are pushing CREATE TABLE AS as the preferred >> spelling, people will probably complain if it omits functionality that >> SELECT INTO provides; so I'm not sure that "SELECT n" in one case and >> "CREATE TABLE AS" in the other would be a good idea either. Any >> opinions what to do here? > Another consideration is that the SQL command tags are defined by the > SQL standard. So if we were to change it, then it should be "CREATE > TABLE". I'm not convinced that it should be changed, though. (I recall > cross-checking our list against the SQL standard in the past, so there > might have been discussion on this already.) If we were going to change the output at all, I would vote for "CREATE TABLE nnnn" so as to preserve the rowcount functionality. Keep in mind though that this would force client-side changes, for instance in libpq's PQcmdTuples(). Fixing that one routine isn't so painful, but what of other client-side libraries, not to mention applications? regards, tom lane