Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNUy0-0004Is-A7 for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 02:02:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dNUxz-0001zt-MF for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 02:01:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dNUxI-0000l9-KF for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 02:01:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dNUxB-0002PG-NK for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 02:01:15 +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 v5L2169r021459; Tue, 20 Jun 2017 22:01:06 -0400 From: Tom Lane To: Amit Langote cc: Bruno Wolff III , pgsql-bugs@postgresql.org Subject: Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS In-reply-to: <73b2a51a-3cf9-a44c-4cd0-bbc611016eb4@lab.ntt.co.jp> References: <20170621004237.GB8337@wolff.to> <73b2a51a-3cf9-a44c-4cd0-bbc611016eb4@lab.ntt.co.jp> Comments: In-reply-to Amit Langote message dated "Wed, 21 Jun 2017 10:15:28 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21457.1498010466.1@sss.pgh.pa.us> Date: Tue, 20 Jun 2017 22:01:06 -0400 Message-ID: <21458.1498010466@sss.pgh.pa.us> 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 Amit Langote writes: > On 2017/06/21 9:42, Bruno Wolff III wrote: >> I'm not seeing an obvious error in my attempt to use CREATE STATISTICS IF >> NOT EXISTS. Given this is new, maybe there is a bug in the parser. > Looks like a documentation bug if the authors of the feature actually > meant to implement the following syntax: > CREATE [ IF NOT EXISTS ] STATISTICS Hm, that is what the grammar supports, but surely it's utterly inconsistent with every other usage of IF NOT EXISTS. Even if this was intended and the docs were not, we should fix the grammar to match the docs not vice versa. 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