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

Stephen Froehlich <s.froehlich@cablelabs.com>

From: Stephen Froehlich <s.froehlich@cablelabs.com>
To: "pgsql-novice@postgresql.org" <pgsql-novice@postgresql.org>
Date: 2018-01-19T05:23:26Z
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.froehlich@cablelabs.com
Tel: +1 (303) 661-3708

Commits

  1. Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

  2. Identity columns