Re: [HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-07 Thread amul sul
>On Monday, 4 January 2016 8:24 PM, Tom Lane wrote: >Either way, however, the way you declared c2, it has an independent >local definition of all four columns, and so they should not go away >even if the parent's columns go away. This is exactly the purpose >that attislocal was created to serve,

Re: [HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-04 Thread Tom Lane
amul sul writes: > In inheritance, child column's pg_attribute.attislocal flag not getting > updated, if it is inherited using ALTER TABLE INHERIT . I think this patch is wrong and you have broken the intended behavior. It's a bit hard to tell though because your example is confused. > CREATE

Re: [HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-04 Thread Robert Haas
On Mon, Jan 4, 2016 at 9:28 AM, Rushabh Lathia wrote: > On Mon, Jan 4, 2016 at 4:41 PM, amul sul wrote: >> Hi, >> In inheritance, child column's pg_attribute.attislocal flag not getting >> updated, if it is inherited using ALTER TABLE INHERIT . >> >> Due to this, if we try to drop column(s) from

Re: [HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-04 Thread Amit Langote
Hi, On Mon, Jan 4, 2016 at 8:11 PM, amul sul wrote: > Hi, > > In inheritance, child column's pg_attribute.attislocal flag not getting > updated, if it is inherited using ALTER TABLE INHERIT . > > Due to this, if we try to drop column(s) from parent table, which are not > getting drop from chil

Re: [HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-04 Thread Rushabh Lathia
On Mon, Jan 4, 2016 at 4:41 PM, amul sul wrote: > Hi, > > In inheritance, child column's pg_attribute.attislocal flag not getting > updated, if it is inherited using ALTER TABLE INHERIT . > > Due to this, if we try to drop column(s) from parent table, which are not > getting drop from child. > A

[HACKERS] Bug in MergeAttributesIntoExisting() function.

2016-01-04 Thread amul sul
Hi, In inheritance, child column's pg_attribute.attislocal flag not getting updated, if it is inherited using ALTER TABLE INHERIT . Due to this, if we try to drop column(s) from parent table, which are not getting drop from child. Attached herewith is quick patch fixing this issue. -