| From: | Edwin Grubbs <egrubbs(at)rackspace(dot)com> |
|---|---|
| To: | "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu> |
| Cc: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Newbie Inheritance Question |
| Date: | 2001-06-26 14:34:20 |
| Message-ID: | Pine.LNX.4.30.0106260925270.9163-100000@zamboni.wc6.rackspace.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, 22 Jun 2001, Thalis A. Kalfigopoulos wrote:
> If you want to stick to inheritance (which I don't see necessarily as a bad idea) the correct think would be to remove the entry from the parent and insert it in the corresponding child table.
> So either you use inheritance and let Pg transparently take care of the "relationship" between parent-children or create the tables with id's so you can connect the corresponding entries with joins to implement the relationship yourself.
>
> I guess things get hairy with when you have multiple inheritance, which doesn't seem to be your case.
>
>
> cheers,
> thalis
>
> ps what was the question about "how to get indexes to work when selecting from all the inherited tables at once"?
>
The problem I've had with using indexes and inherited tables is that
selecting from all the inherited tables with "parent*" does not use any
indexes even though selecting from "parent" or "child" will use the proper
indexes.
SELECT *
FROM parent*
WHERE id = 123;
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ÀîÁ¢Ð | 2001-06-26 14:35:00 | Re: Re: index on a box |
| Previous Message | Ian Harding | 2001-06-26 14:14:39 | Re: Confused about SHMMAX |