Re: Bug in MergeAttributesIntoExisting() function. - Mailing list pgsql-hackers

From amul sul
Subject Re: Bug in MergeAttributesIntoExisting() function.
Date
Msg-id 159193854.1898820.1452238534634.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Bug in MergeAttributesIntoExisting() function.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>On Monday, 4 January 2016 8:24 PM, Tom Lane <tgl@sss.pgh.pa.us> 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, and your patch destroys it.

Understood this is not a bug, thank you.


I missed ALTER TABLE statement in previous test case, correct test case is as follow:
-- create table
CREATE TABLE p1 (a int , b int);
CREATE TABLE c2 (a int , b int);

-- alter c2' inheritance 
ALTER TABLE c2 INHERIT p1;

-- drop column b
ALTER TABLE p1 DROP COLUMN b;

-- table description 


postgres=# \d p1
Table "public.p1"
Column |  Type  | Modifiers 
--------+---------+-----------
a    | integer | 
Number of child tables: 1 (Use \d+ to list them.)

postgres=# \d c2
Table "public.c2"
Column |  Type  | Modifiers 
--------+---------+-----------
a    | integer | 
b    | integer | 
Inherits: p1



Regards,
Amul Sul



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Duplicate 'use' for TestLib in 001_ssltests.pl
Next
From: Michael Paquier
Date:
Subject: Re: Duplicate 'use' for TestLib in 001_ssltests.pl