Bug? inheriting primary key

Поиск
Список
Период
Сортировка
От Jim Cromie
Тема Bug? inheriting primary key
Дата
Msg-id 37F5D5FA.65734791@bwn.net
обсуждение исходный текст
Ответ на Referential Integrity functions for 2 different users  (Jim Cromie <jimcr@bwn.net>)
Список pgsql-general
-- RI inherits right ?
-- no ! A has primary key, A1 doesnt
-- but A1 should have all columns of A
-- and I assumed properties on them

-- apparently 2 stage drop is needed
--  drop derived 1st, then base
drop table A1;
drop table A;

create table A ( -- common elements,
 name  varchar(20) not null,  -- key field
 primary key ( name )
);

create table A1 (
 -- name,
 rank  text
 -- primary key ( name ) -- err if uncommented
) inherits ( A );

insert into A values ('yo');
insert into A values ('hey');
-- insert into a values ('hey'); -- disallowed

select * from A;

insert into A1 values ('yo');
insert into A1 values ('hey');
insert into A1 values ('hey');  -- allowed

select * from A1;

-- seems last should be disallowed




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

Предыдущее
От: "Doran L. Barton"
Дата:
Сообщение: equal: don't know whether nodes of type 719 are equal
Следующее
От: Frank Mandarino
Дата:
Сообщение: Re: [GENERAL] btree index on a char(8) field (fwd)