Re: Inheritance: delete parent deletes children

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "M(dot) I(dot)" <google(dot)clp(at)alma(dot)ch>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inheritance: delete parent deletes children
Date: 2002-10-04 15:37:49
Message-ID: 20021004083613.U36970-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 2 Oct 2002, M. I. wrote:

> But I just realized that things actually go into that "logging" table,
> not into the child tables. I wonder how the database knows which row
> in logging is related to which row in a child table.

Well, selects, inserts, updates, deletes by default go through the
inheritance tree if you do them on a parent, so select * from
logging will show rows from the child tables. You can use ONLY
to turn off that behavior (select * from ONLY logging) should
show rows only in that particular table and not the children.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-10-04 15:40:46 Re: Deadlock
Previous Message Stephan Szabo 2002-10-04 15:34:58 Re: [ADMIN] Fast Deletion For Large Tables