Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Bruno Wolff III <bruno@wolff.to>, pgsql-bugs@postgresql.org
Date: 2017-06-21T02:01:06Z
Lists: pgsql-bugs, pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> 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


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix IF NOT EXISTS in CREATE STATISTICS