Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-10-12 Thread Andrew Dunstan
Itagaki Takahiro wrote: Andrew Dunstan wrote: I'm wondering why we are not copying comments on cloned indexes. I realize that might involve a bit more code, but I think I'd feel happier if we cloned all the comments we reasonably could from the outset. Is it really that hard to do?

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-10-04 Thread Itagaki Takahiro
Andrew Dunstan wrote: > I'm wondering why we are not > copying comments on cloned indexes. I realize that might involve a bit > more code, but I think I'd feel happier if we cloned all the comments we > reasonably could from the outset. Is it really that hard to do? I found it is not so diff

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-10-04 Thread Itagaki Takahiro
Khee Chin wrote: > Recently, I encountered a situation where the docs on (or impl?) > INCLUDING INDEXES and INCLUDING CONSTRAINTS are not clearly defined > for primary keys. Should it be noted in the docs that in this case, we > are referring to the technical implementation of a primary key, i.e

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-10-04 Thread Khee Chin
Recently, I encountered a situation where the docs on (or impl?) INCLUDING INDEXES and INCLUDING CONSTRAINTS are not clearly defined for primary keys. Should it be noted in the docs that in this case, we are referring to the technical implementation of a primary key, i.e. a unique index and a not n

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-10-03 Thread Andrew Dunstan
Itagaki Takahiro wrote: I removed hunks by sql_help.c and fix a typo in documentation. An updated patch attached. Brendan Jurd wrote: With the sql_help.c changes removed, the patch applied fine and testing went well. I noticed only the following in the new documentation in CREATE TABLE:

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-30 Thread Itagaki Takahiro
Alvaro Herrera wrote: > Hmm, so it works to specify LIKE t1 INCLUDING COMMENTS EXCLUDING COMMENTS? Only last specifer is applied, which is the same behavior as of now. EXCLUDING is typically useless because all of the default values are EXCLUDING, but "INCLUDING ALL EXCLUDING xxx" are meaningf

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-29 Thread Alvaro Herrera
Itagaki Takahiro escribió: > I removed hunks by sql_help.c and fix a typo in documentation. > An updated patch attached. Hmm, so it works to specify LIKE t1 INCLUDING COMMENTS EXCLUDING COMMENTS? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replicatio

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-28 Thread Itagaki Takahiro
I removed hunks by sql_help.c and fix a typo in documentation. An updated patch attached. Brendan Jurd wrote: > With the sql_help.c changes removed, the patch applied fine and > testing went well. > > I noticed only the following in the new documentation in CREATE TABLE: > - INCLUDING DEFA

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-27 Thread Brendan Jurd
2009/9/28 Itagaki Takahiro : > Brendan Jurd wrote: >> patching file src/bin/psql/sql_help.c >> Hunk #1 FAILED at 3. >> Hunk #2 FAILED at 1279. >> 2 out of 2 hunks FAILED -- saving rejects to file src/bin/psql/sql_help.c.rej > > Oops, sql_help.c is an automatic generated file. Please ignore the par

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-27 Thread Itagaki Takahiro
Brendan Jurd wrote: > patching file src/bin/psql/sql_help.c > Hunk #1 FAILED at 3. > Hunk #2 FAILED at 1279. > 2 out of 2 hunks FAILED -- saving rejects to file src/bin/psql/sql_help.c.rej > > I have attached the rejects file. Oops, sql_help.c is an automatic generated file. Please ignore the

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-27 Thread Brendan Jurd
2009/9/28 Itagaki Takahiro : > 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. I had two hunks fail trying to apply your new pat

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-27 Thread Itagaki Takahiro
Brendan Jurd 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 a

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-25 Thread Brendan Jurd
2009/9/7 Itagaki Takahiro : > Here is a patch to implement the following items in our ToDo list: >  * Add CREATE TABLE LIKE ... INCLUDING COMMENTS >  * Have CREATE TABLE LIKE copy column storage parameters > Hello Itagaki-san, I am doing an initial review of your patch. I applied the version lab

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-13 Thread Brendan Jurd
2009/9/9 Itagaki Takahiro : > Alvaro Herrera wrote: >> This INCLUDING STORAGE is supposed to copy reloptions? > > No. It copies only storage parameters of columns to control TOAST policy. > It might be good to have some features to copy reloptions with convenient > way, but it will be done in anot

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-08 Thread Itagaki Takahiro
Alvaro Herrera wrote: > This INCLUDING STORAGE is supposed to copy reloptions? No. It copies only storage parameters of columns to control TOAST policy. It might be good to have some features to copy reloptions with convenient way, but it will be done in another patch. > to me it sounds like i

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-08 Thread Alvaro Herrera
Itagaki Takahiro wrote: > > David Fetter wrote: > > > On Mon, Sep 07, 2009 at 12:15:21PM +0900, Itagaki Takahiro wrote: > > > Here is a patch to implement the following items in our ToDo list: > > > * Add CREATE TABLE LIKE ... INCLUDING COMMENTS > > > * Have CREATE TABLE LIKE copy column sto

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-07 Thread Itagaki Takahiro
David Fetter wrote: > On Mon, Sep 07, 2009 at 12:15:21PM +0900, Itagaki Takahiro wrote: > > Here is a patch to implement the following items in our ToDo list: > > * Add CREATE TABLE LIKE ... INCLUDING COMMENTS > > * Have CREATE TABLE LIKE copy column storage parameters > > > > The syntax is

Re: [HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-07 Thread David Fetter
On Mon, Sep 07, 2009 at 12:15:21PM +0900, Itagaki Takahiro wrote: > Here is a patch to implement the following items in our ToDo list: > * Add CREATE TABLE LIKE ... INCLUDING COMMENTS > * Have CREATE TABLE LIKE copy column storage parameters > > The syntax is: > CREATE TABLE clone_table (L

[HACKERS] CREATE LIKE INCLUDING COMMENTS and STORAGES

2009-09-06 Thread Itagaki Takahiro
Here is a patch to implement the following items in our ToDo list: * Add CREATE TABLE LIKE ... INCLUDING COMMENTS * Have CREATE TABLE LIKE copy column storage parameters The syntax is: CREATE TABLE clone_table (LIKE template_table INCLUDING COMMENTS) -- also copy comments on column