Re: Bug in MergeAttributesIntoExisting() function.

Поиск
Список
Период
Сортировка
Искать
От
amul sul
Тема
Re: Bug in MergeAttributesIntoExisting() function.
Дата
Msg-id
159193854.1898820.1452238534634.JavaMail.yahoo@mail.yahoo.com
Ответ на
Список
Дерево обсуждения
Bug in MergeAttributesIntoExisting() function. amul sul <sul_amul@yahoo.co.in>
Re: Bug in MergeAttributesIntoExisting() function. Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in MergeAttributesIntoExisting() function. amul sul <sul_amul@yahoo.co.in>
Re: Bug in MergeAttributesIntoExisting() function. Amit Langote <amitlangote09@gmail.com>
Re: Bug in MergeAttributesIntoExisting() function. Rushabh Lathia <rushabh.lathia@gmail.com>
Re: Bug in MergeAttributesIntoExisting() function. Robert Haas <robertmhaas@gmail.com>
>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, 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 по дате отправления
От: Kyotaro HORIGUCHI
Дата:
От: Michael Paquier
Дата:
FAQ