Re: WITH clause in CREATE STATISTICS

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Subject: Re: WITH clause in CREATE STATISTICS
Date: 2017-05-03 18:33:42
Message-ID: 20170503183342.n66mailptvx3jxe5@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-05-03 18:51:49 Re: password_encryption, default and 'plain' support
Previous Message Kenneth Marshall 2017-05-03 18:22:06 Re: CTE inlining