drop column name conflict

Поиск
Список
Период
Сортировка
От Joseph Koshakow
Тема drop column name conflict
Дата
Msg-id CAAvxfHcB8zPLiTLYc=GqQCM157aRNp7nMD567KCG-dEqVNdAMA@mail.gmail.com
обсуждение исходный текст
Ответы Re: drop column name conflict  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,

There's a rare edge case in `alter table` that can prevent users from
dropping a column as shown below

    # create table atacc1(a int, "........pg.dropped.1........" int);
    CREATE TABLE
    # alter table atacc1 drop column a;
    ERROR:  duplicate key value violates unique constraint "pg_attribute_relid_attnam_index"
    DETAIL:  Key (attrelid, attname)=(16407, ........pg.dropped.1........) already exists.

It seems a bit silly and unlikely that anyone would ever find
themselves in this scenario, but it also seems easy enough to fix as
shown by the attached patch.

Does anyone think this is worth fixing? If so I can submit it to the
current commitfest.

Thanks,
Joe Koshakow
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: On disable_cost
Следующее
От: Tom Lane
Дата:
Сообщение: Re: drop column name conflict