Bug #636: REFERENCES on Inherits Table

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #636: REFERENCES on Inherits Table
Дата
Msg-id 20020419155748.AED3D47594B@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
Alban Médici (amedici@fr.netcentrex;net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
REFERENCES on Inherits Table

Long Description
Some inheritances bugss are fiked but not all !!!!

In the New version of postgresSQL (7.2.1) inheritance bug was fixed.
Now SQL99 is respect for simple inheritance behavior.

// Example :

create table people( id INT UNIQUE, name VARCHAR);
create table mother( nb_son INT) INHERITS(people);
create table house (id INT UNIQUE, nbFloor INT, ownerID  INT REFERENCES "people"("id"));

insert into mother VALUES (1,'first mum',0);
insert into mother VALUES (2,'second mum',3);

DB=# select * from mother ;
 id |    name    | nb_son 
----+------------+--------
  1 | first mum  |      0
  2 | second mum |      3
(2 rows)

:) OK


DB=# select * from people ;
 id |    name    
----+------------
  1 | first mum
  2 | second mum
(2 rows)

:) OK

now test if respect SQL99 
DB=# select id  from people where name='second mum';
 id 
----
  2
(1 row)

:p  Ouah  !! One bug Fix !!!! cool 

// Now the references test ( humhum suspens ...... ;-) )

DB=# insert into house values (1,3,2);
ERROR:  <unnamed> referential integrity violation - key referenced f


meens that value id=2 don't exist in people table !!!!!
:-(

Non Fix Bug !!!!

Sample Code


No file was uploaded with this report

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Potential bug
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Patch for memory leaks in index scan