Skip site navigation (1) Skip section navigation (2)

Uncopied parameters on CREATE TABLE LIKE

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Uncopied parameters on CREATE TABLE LIKE
Date: 2008-07-24 10:09:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
CREATE TABLE LIKE is useful to create a new partition from a template
table. We can use 3 options (INCLUDING DEFAULTS, CONSTRAINTS and INDEXES)
to copy more parameters from the template, but there are still some
uncopied parameters:

  1. column storage parameters (toast options)
  2. reloptions on table (on index is copied already)

I'd like to modify CREATE TABLE LIKE to copy those parameters. Especially
1 and 2 are important when we use CREATE TABLE LIKE on partitioning because
all of the child tables should have same physical properties.

I'm thinking to modify 1 and 2 to be copied as default from a tempalte to
a new table because reloptions of indexes are automatically copied already.
I'm not sure for 3, but as of now I have a plan to add INCLUDING COMMENTS

Comments welcome.

ITAGAKI Takahiro
NTT Open Source Software Center


pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-07-24 12:33:16
Subject: Re: Uncopied parameters on CREATE TABLE LIKE
Previous:From: Simon RiggsDate: 2008-07-24 09:52:11
Subject: Additional psql requirements

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group