Re: Inheritance and Foreign Keys

From: Nelio Alves Pereira Filho <nelio(at)ifx(dot)com(dot)br>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Inheritance and Foreign Keys
Date: 2001-01-04 22:36:29
Message-ID: 3A54FAED.A16DE526@ifx.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is it planned to include these features to class inheritance?

Nelio

Oliver Elphick wrote:
>
> 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(dot)Elphick(at)lfix(dot)co(dot)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

--
Nelio Alves Pereira Filho
IFX Networks - www.ifx.com.br
+55 11 3365-5863
nelio(at)ifx(dot)com(dot)br

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Banks 2001-01-04 22:46:33 replication woes
Previous Message Oliver Elphick 2001-01-04 22:25:27 Re: Inheritance and Foreign Keys