Re: Inheritance and Foreign Keys
От | Oliver Elphick |
---|---|
Тема | Re: Inheritance and Foreign Keys |
Дата | |
Msg-id | 200101042225.f04MPRH11897@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | Inheritance and Foreign Keys (Nelio Alves Pereira Filho <nelio@ifx.com.br>) |
Список | pgsql-general |
Nelio Alves Pereira Filho wrote: >Here's my situation: I have the following relation > >table A -----<>------ table B > 1:N > >I created the two tables, and a foreign key from A into B. Now I want to >create other tables that inherit from B, but I want that the relation >exists for all of them. For that, I created another table, C, that had >just one field and inherited from B. No errors showed up, but it didn't >complain when I inserted some data into C without the corresponding one >in A!! > >Is it possible to do what I intended? Unfortunately not. Inheritance is not properly thought out; at present it allows fields to be duplicated and records selected from an inheritance hierarchy, but this is relatively useless because constraints are not inherited and indexes are not shared. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "But because of his great love for us, God, who is rich in mercy, made us alive with Christ even when we were dead in transgressions-it is by grace you have been saved." Ephesians 2:4,5
В списке pgsql-general по дате отправления: