Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNUz2-0004Li-7z for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 02:03:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dNUz1-0003GP-RH for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jun 2017 02:03:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dNUyK-00020n-Le for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 02:02:20 +0000 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dNUyG-0002ZQ-SR for pgsql-bugs@postgresql.org; Wed, 21 Jun 2017 02:02:20 +0000 Received: by mail-qk0-x234.google.com with SMTP id r62so72151464qkf.0 for ; Tue, 20 Jun 2017 19:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=PyzaciJtZKrYwryz+z5yRUoI3tBEQQtzbQ29PeGOkhU=; b=EUgM+z+W/t7IIOQ+JfxNEipzkc2K5wtJTBynhaHG6AmZYyQuG5b/78C467waN/iNc1 SH4KvquyfcOuYLwqmAZUceqMRSlLiDNj2bZrafHAPHoOJT2uk07E5GzPzgwReIors69O vy/DRYnsvPGaHamS1t7Qy+58KDHHV9TwF9fBoC63qvpCjbJeRjmUm2q67p4QJe4ZUk8J p9faBWSUjsnqsd8YlQeUTnFXNSeEm1j+RIawNX2uAHqjqs7tg/aLrY53Emib8niG2DR4 +NRzUKA9mfPkLE/4djYnoxSf7ttHc4A/4/cXuu3azkwNGBmz4PV8vfS8drLh1+4FPiM0 A0pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PyzaciJtZKrYwryz+z5yRUoI3tBEQQtzbQ29PeGOkhU=; b=ngWfFNWCeBO3xdPQ4XUeOo+nT9J5TULmZFQZm0dkk2KgJbq1sRKHhD5ZVT9xAqQR3l ACJj590q0gKZTzmMZ7rXR37UCh5div8+g4HF1YBCTMJXRkl8TBq5imI1m0GjWZORluF7 hXoMqEDE7Cnv/8YltjN+O/4Qk75zsIFbueh0o9AVzEy+QexyoYaJrLlQZB+5xex7ykT5 gMlQkBhfN/MSJ6AZ97IsfCbDYyvv7KbXv7SGQGtYBJ8PQ+CfrwnLx45H7oGGH/Ig+DWZ LPgkXB+LpPRY+UiRdxDdNqE9tlUrupfBXQQpzfaDI5E4h2PIdSPp1k/Kc3nrAFMBekrS 3UUQ== X-Gm-Message-State: AKS2vOw+4R3ImYA0qb8cgZzJszn8Fw7kHlM4aDeb9K97GO0qZcZAHtmF MNbBBS//deWYP+C0/BX59xsljFoo+LT9z6XNtmqa+NkCCOwJTibGJeZ4hYghbnh1ysVb347X77L yJwKuKUpY++Ri2jn6/HrU6a7ZEwrO4FcsuDNgcIxazqC3lTCkwNlP6MQBv6PK8jaWCw== X-Received: by 10.55.168.17 with SMTP id r17mr38576647qke.146.1498010534202; Tue, 20 Jun 2017 19:02:14 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.217.209.130]) by smtp.gmail.com with ESMTPSA id s6sm3999422qki.44.2017.06.20.19.02.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2017 19:02:13 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 9577E493; Tue, 20 Jun 2017 22:02:10 -0400 (-04) Date: Tue, 20 Jun 2017 22:02:10 -0400 From: Alvaro Herrera To: Bruno Wolff III , pgsql-bugs@postgresql.org Subject: Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS Message-ID: <20170621020210.eqf44aoqjcu3qtma@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vkrsvmbh63hjngly" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170621004237.GB8337@wolff.to> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) 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 --vkrsvmbh63hjngly Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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. You're absolutely right, and this is a bug in the parser -- I probably misplaced the IF NOT EXISTS clause while playing with Tomas' parser changes. Here's the fix. I'm a bit troubled that this change doesn't seem to affect any tests, so I'll add some before pushing. (Now, "statistics" being plural would seem to call for CREATE STATISTICS IF NOT EXIST, rather than EXISTS, but I'll put that thought aside on account of it being just too weird ...) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --vkrsvmbh63hjngly Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-fix-create-stats-grammar.patch"