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

From: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date: 2018-01-19 05:23:26
Message-ID: CY1PR0601MB1927315B45667A1B679D0FD5E5EF0@CY1PR0601MB1927.namprd06.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

I use a CREATE TABLE ... LIKE [default_table] (INCLUDING ALL) query to create partitions of a hypertable, and I have found that I need to add a "CREATE STATISTICS" entry between two columns of the table.

Are custom statistics in PG10 retained in LIKE (INCLUDING ALL) or do I need to recreate the statistics by hand each time I create a new table?

Thanks,
Stephen

Stephen Froehlich
Sr. Strategist, CableLabs(r)

s(dot)froehlich(at)cablelabs(dot)com
Tel: +1 (303) 661-3708

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-01-19 05:38:01 Typo in slotfuncs.c
Previous Message Michael Paquier 2018-01-19 05:18:04 Re: [HACKERS] generated columns

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2018-01-20 05:50:19 Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Previous Message Garry Chen 2018-01-18 20:13:34 RE: how to remove set_config from all user