Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNTo0-0000Gr-Bb for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 00:47:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dNTnz-0002xm-JQ for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 00:47:35 +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 1dNTny-0002xN-SA for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 00:47:35 +0000 Received: from wolff.to ([98.103.208.27]) by makus.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dNTns-0000zC-Gv for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 00:47:33 +0000 Received: (qmail 8740 invoked by uid 500); 21 Jun 2017 00:42:37 -0000 Date: Tue, 20 Jun 2017 19:42:37 -0500 From: Bruno Wolff III To: pgsql-bugs@postgresql.org Subject: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS Message-ID: <20170621004237.GB8337@wolff.to> Mail-Followup-To: Bruno Wolff III , pgsql-bugs@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) 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 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. Sample output: psql (10beta1) Type "help" for help. o365logs=# select version(); version -------------------------------------------------------------------------------- ---------------------------- PostgreSQL 10beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit (1 row) o365logs=# CREATE STATISTICS IF NOT EXISTS logs_corrtest (dependencies) ON record_type, operation FROM logs; ERROR: syntax error at or near "NOT" LINE 1: CREATE STATISTICS IF NOT EXISTS logs_corrtest (dependencies)... ^ o365logs=# CREATE STATISTICS logs_corrtest (dependencies) ON record_type, operation FROM logs; CREATE STATISTICS o365logs=# DROP STATISTICS IF EXISTS logs_corrtest; DROP STATISTICS o365logs=# -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs