Brendan Jurd <direvus@gmail.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