Re: Newbie Inheritance Question - Mailing list pgsql-general

From Edwin Grubbs
Subject Re: Newbie Inheritance Question
Date
Msg-id Pine.LNX.4.30.0106260925270.9163-100000@zamboni.wc6.rackspace.com
Whole thread Raw
In response to Re: Newbie Inheritance Question  ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>)
Responses Re: Newbie Inheritance Question  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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
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;



pgsql-general by date:

Previous
From: David Wheeler
Date:
Subject: Re: More Red Hat information
Next
From: martin.chantler@convergys.com
Date:
Subject: Re: More Red Hat information