When using multiple inheritance, insufficient tests exist for whethera data type change is safe.

Поиск
Список
Период
Сортировка
От Chris Travers
Тема When using multiple inheritance, insufficient tests exist for whethera data type change is safe.
Дата
Msg-id CAN-RpxBEjC=qQp6+sgdi88MDEsdJkmGABnx4-c55B466zSUraw@mail.gmail.com
обсуждение исходный текст
Список pgsql-bugs
Minimal reproduceable example:

create table buggy (Id int);
create table buggy2 (like buggy) inherits (buggy);
create table buggy3 (like buggy);
alter table buggy2 inherit buggy3;
alter table buggy3 alter id type bigint;
insert into buggy2 (Id) values (3000000000);
select * from buggy;

Result:

ERROR:  attribute "id" of relation "buggy2" does not match parent's type


Now note that when adding an inheriting table this is checked.

bug=# alter table buggy2 inherit buggy4;

ERROR:  child table "buggy2" has different type for column "id"


However this allows types to propagate in inconsistent ways down an inheritance tree with multiple inheritance and could bring queries to a screeching halt.....


--
Best Regards,
Chris Travers
Database Administrator

Tel: +49 162 9037 210 | Skype: einhverfr | www.adjust.com 
Saarbrücker Straße 37a, 10405 Berlin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15102: Performance problem when doing join, index are not used
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15103: Do not use pfree() to free pg_malloc() return value invacuum_one_database()