From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | "Dmitry G(dot) Mastrukov" <dmitry(at)taurussoft(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Question about inheritance |
Date: | 2001-06-10 03:48:30 |
Message-ID: | 200106100348.f5A3mUZ25772@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have added this thread to TODO.detail/inheritance.
> > "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > > Am I misunderstanding how the mechanism works, or is this a big, not
> easily
> > > solved, problem?
> >
> > The latter. Check the list archives for previous debates about this.
> > It's not real clear whether an inherited primary key should be expected
> > to be unique across the whole inheritance tree, or only unique per-table
> > (IIRC, plausible examples have been advanced for each case). If we want
> > uniqueness across multiple tables, it'll take considerable work to
> > create an index mechanism that'd enforce it.
> >
> IMHO current behaviour of PostgreSQL with inherited PK, FK, UNIQUE is
> simply
> bug not only from object-oriented but even object-related point of view.
> Now
> I can violate parent PK by inserting duplicate key in child!
>
> Inherited tables should honours all constraints from parent. If I change
> some constraint (seems only FK, but not PK or UNIQUE) I should be able to
> do
> it in more restrictive manner. For example, two base table is connected via
> FK. I can change such FK in childs from base1->base2 to child1->child2 (or
> child3) but not to child1->not_inherited_from_base2. CHECK, DEFAULT, NOT
> NULL are more free to changes, isn't it?
>
> IMHO last message in doc/TODO.details/inheritance from Oliver Elphick is a
> good direction for implementing with exception on more rectrictive child FK
> constraint (p.3 of message).
>
> As for me, I was pushed to rollback to scheme with no inheritance at all in
> my project for now. So I'm very interesting in implementing of right
> inheritance and I wanted to ask similar question in one of the lists in
> near
> future.
>
> Regards,
> Dmitry
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Pilosov | 2001-06-10 06:51:54 | Re: inet type/merge joins |
Previous Message | Tom Lane | 2001-06-10 03:05:56 | Re: cstring datatype |