Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date: 2018-01-27 22:55:33
Message-ID: dc15f95b-f738-5234-60a0-9051b32042e6@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

Hi,

On 01/27/2018 10:09 PM, David Rowley wrote:
> On 27 January 2018 at 00:03, Tels <nospam-pg-abuse(at)bloodgate(dot)com> wrote:
>> Looking at the patch, at first I thought the order was sorted and you
>> swapped STORAGE and STATISTICS by accident. But then, it seems the order
>> is semi-random. Should that list be sorted or is it already sorted by some
>> criteria that I don't see?
>>
>> - <literal>INCLUDING DEFAULTS INCLUDING IDENTITY INCLUDING
>> CONSTRAINTS INCLUDING INDEXES INCLUDING STORAGE INCLUDING
>> COMMENTS</literal>.
>> + <literal>INCLUDING DEFAULTS INCLUDING IDENTITY INCLUDING
>> CONSTRAINTS INCLUDING INDEXES INCLUDING STORAGE INCLUDING STATISTICS
>> INCLUDING COMMENTS</literal>.
>
> It looks like they were in order of how they're defined in enum
> TableLikeOption up until [1], then I'm not so sure what the new order
> is based on after that.
>
> I'd offer to put it back to the order of the enum, but I want to
> minimise the invasiveness of the patch. I'm not sure yet if it should
> be classed as a bug fix or a new feature.
>
> On looking at this I realised I missed changing the syntax synopsis.
> The attached adds this.
>

Thanks for working on a patch. This should have been in the statistics
patch, no doubt about that.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-01-27 23:00:26 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Previous Message Tomas Vondra 2018-01-27 22:53:40 Re: Write lifetime hints for NVMe

Browse pgsql-novice by date

  From Date Subject
Next Message Tomas Vondra 2018-01-27 23:00:26 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Previous Message Tom Lane 2018-01-27 21:45:41 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?