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
removethe 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
createthe 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;