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

From Dean Rasheed
Subject Re: [HACKERS] WITH clause in CREATE STATISTICS
Date
Msg-id CAEZATCVQhTH0r-cvWDKT4x78rx03Fjpu=E0LhOmdgPuvZKXmew@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] WITH clause in CREATE STATISTICS  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On 21 April 2017 at 01:21, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> On 04/21/2017 12:13 AM, Tom Lane wrote:
>>
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>>>
>>> Simon just pointed out that having the WITH clause appear in the middle
>>> of the CREATE STATISTICS command looks odd; apparently somebody else
>>> already complained on list about the same.  Other commands put the WITH
>>> clause at the end, so perhaps we should do likewise in the new command.
>>
>> +1 for WITH at the end; the existing syntax looks weird to me too.
>
> -1 from me
>

Yeah, I'm still marginally in favour of the current syntax because
it's a bit more consistent with the CREATE VIEW syntax which puts the
WITH (options) clause before the query, and assuming that multi-table
and partial statistics support do get added in the future, the thing
that the statistics get created on is going to look more like a query.

OTOH, a few people have now commented that the syntax looks weird, and
not just because of the placement of the WITH clause. I don't have any
better ideas, but it's not too late to change if anyone else does...

Regards,
Dean



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Unportable implementation of background worker start
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Replication lag tracking for walsenders