From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Bruno Wolff III <bruno@wolff.to>
To: pgsql-bugs@postgresql.org
Subject: Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
Date: Tue, 20 Jun 2017 22:02:10 -0400
Message-ID: <20170621020210.eqf44aoqjcu3qtma@alvherre.pgsql> (raw)
In-Reply-To: <20170621004237.GB8337@wolff.to>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
Attachments:
0001-fix-create-stats-grammar.patch (text/plain, 0B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, bruno@wolff.to
Subject: Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
In-Reply-To: <20170621020210.eqf44aoqjcu3qtma@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox