From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Scott Frankel <leknarf(at)pacbell(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: inherited table and rules |
Date: | 2005-03-23 02:55:16 |
Message-ID: | 20050322185025.Y42708@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 22 Mar 2005, Scott Frankel wrote:
>
> This is weird. I have two tables: one inherits from the other. And I
> have a
> rule that populates the inherited table with changes from the first.
> When I
> update a row in the first table, I get an ever-larger number of rows
> added to
> both it and the inherited table. i.e.:
>
> update 1 yields 2 new rows
> update 2 yields 6 new rows
> update 3 yields 42 new rows
> update 4 yields 1806 new rows
>
> I'm clearly doing something wrong ;)
I think you need to be using ONLY (or changing the sql_inheritance GUC
variable) in all the queries on people in order to not also be getting
rows from people_history in the SELECT and UPDATE (and in fact changing
the select and update statements to FROM ONLY people seems to work for
me).
From | Date | Subject | |
---|---|---|---|
Next Message | Tony Caduto | 2005-03-23 03:04:42 | Re: Question about function body checking and 8.1 |
Previous Message | Bruce Momjian | 2005-03-23 02:45:54 | Re: checkpoint_timeout |