Re: Bug in MergeAttributesIntoExisting() function.

From: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in MergeAttributesIntoExisting() function.
Date: 2016-01-08 07:35:34
Message-ID: 159193854.1898820.1452238534634.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>On Monday, 4 January 2016 8:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-01-08 07:37:06 Re: Duplicate 'use' for TestLib in 001_ssltests.pl
Previous Message Kyotaro HORIGUCHI 2016-01-08 07:16:54 Duplicate 'use' for TestLib in 001_ssltests.pl