| From: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
|---|---|
| To: | Brendan Jurd <direvus(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: CREATE LIKE INCLUDING COMMENTS and STORAGES |
| Date: | 2009-09-28 02:37:46 |
| Message-ID: | 20090928111746.927F.52131E4D@oss.ntt.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Brendan Jurd <direvus(at)gmail(dot)com> wrote:
> I am doing an initial review of your patch.
Thank you for reviewing.
I merged your fix and add INCLUDING ALL option to the new patch.
I changed InhRelation.options to be a bitmap of CreateStmtLikeOption.
INCLUDING just adds bits, and EXCLUDING drops bits.
Now this patch adds:
* CREATE TABLE LIKE ... INCLUDING COMMENTS (for columns and constraints)
* CREATE TABLE LIKE ... INCLUDING STORAGE
* CREATE TABLE LIKE ... INCLUDING ALL
> I think I'm failing to understand why this would be an issue. Why
> would the user be specifying columns in the CREATE TABLE statement
> that already exist in the table they are cloning?
Without inline-STORAGE syntax, we cannot resolve conflictions of
storage parameters unless we can define tables without STORAGE
and then re-add options with ALTER TABLE.
There might be ToDo items:
* Make INCLUDING COMMENTS also copy comments on indexes.
* Add syntax to define storage options inline like
CREATE TABLE tbl (col text STORAGE MAIN).
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
| Attachment | Content-Type | Size |
|---|---|---|
| create-including_20090928.patch | application/octet-stream | 36.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2009-09-28 02:40:26 | Re: operator exclusion constraints |
| Previous Message | Tom Lane | 2009-09-28 02:19:42 | Re: TODO item: Allow more complex user/database default GUC settings |