Skip site navigation (1) Skip section navigation (2)

Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
Date: 2017-06-21 00:42:37
Message-ID: 20170621004237.GB8337@wolff.to (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-bugspgsql-hackers
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=# 



Responses

pgsql-hackers by date

Next:From: Amit LangoteDate: 2017-06-21 00:42:47
Subject: Re: Setting pd_lower in GIN metapage
Previous:From: Tom LaneDate: 2017-06-21 00:30:34
Subject: Re: pg_bsd_indent 2.0 is available from git.postgresql.org

pgsql-bugs by date

Next:From: Amit LangoteDate: 2017-06-21 01:15:28
Subject: Re: Beta 10 parser error for CREATE STATISTICS IF NOT EXISTS
Previous:From: Mohamed AkramDate: 2017-06-20 13:57:13
Subject: Re: BUG #14670: uuid_generate_v3 and uuid_generate_v5 do not support binary names

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group