Re: [HACKERS] WITH clause in CREATE STATISTICS - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] WITH clause in CREATE STATISTICS
Date
Msg-id 20170503183342.n66mailptvx3jxe5@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] WITH clause in CREATE STATISTICS  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] WITH clause in CREATE STATISTICS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Alvaro Herrera wrote:
> Simon Riggs wrote:
> 
> > 2.
> > USING keyword, no brackets
> > CREATE STATISTICS s1 USING (dependencies, ndistinct) ON (a, b) FROM t1
> > WHERE partial-stuff;
> > 
> > and if there are options, use the WITH for the optional parameters like this
> > CREATE STATISTICS s1 USING (dependencies, ndistinct) WITH (options) ON
> > (a, b) FROM t1 WHERE partial-stuff;
> > 
> > 
> > I think I like (2)
> 
> OK, sounds sensible.

Yawn.  So, we have not achieved the stated goal which was to get rid of
the ugly clause in the middle of the command; moreover we have gained
*yet another* clause in the middle of the command.  Is this really an
improvement?  We're trading this   CREATE STATISTICS s1 WITH (dependencies, ndistinct, options) ON (a, b) FROM t1 WHERE
partial-stuff;
for this:   CREATE STATISTICS s1 USING (dependencies, ndistinct) WITH (options) ON (a, b) FROM t1 WHERE partial-stuff;

Can we decide by a show of hands, please, whether we're really on board
with this change?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Kenneth Marshall
Date:
Subject: Re: [HACKERS] CTE inlining
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] password_encryption, default and 'plain' support