Restrictions on columns are not being passed to children tables.

Поиск
Список
Период
Сортировка
От Holger Klawitter
Тема Restrictions on columns are not being passed to children tables.
Дата
Msg-id 39F5B26E.30A205AB@klawitter.de
обсуждение исходный текст
Список pgsql-bugs
Hi there,

I am not sure whether this is a design flaw in the inheritance scheme
of Postgres or a generic problem with DB design (or a problem with
my understanding of inheritance in RDBS :-)

Imagine the following situation:

    CREATE TABLE parent ( id INT UNIQUE );
    CREATE TABLE child () INHERITS ( parent );
    INSERT INTO parent VALUES ( 1 );
    INSERT INTO parent VALUES ( 1 );  -- breaks as expected --
    INSERT INTO child VALUES( 1 );    -- works, but shouldn't --
    INSERT INTO child VALUES( 1 );    -- works even the second time --

    SELECT * from parent*;            -- not much of a unique, is it? --

Everything is still fine while SELECTing on "parent" instaed of
"parent*". A word of a warning might be useful in the docs :-)

Regards,
Mit freundlichem Gruß,
    Holger Klawitter
--
Holger Klawitter                                    +49 (0)251 484 0637
holger@klawitter.de                            http://www.klawitter.de/

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Updating multiple bool values crashes backend
Следующее
От: Holger Klawitter
Дата:
Сообщение: Restrictions on columns are not being passed to children tables.