From: | "Talha Khan" <talha(dot)amjad(at)gmail(dot)com> |
---|---|
To: | "Jim Nasby" <decibel(at)decibel(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: A problem in inheritance |
Date: | 2007-06-26 17:49:02 |
Message-ID: | f80885fc0706261049y2edd7d58v9d26e3e13d96852e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>to impact that update you'd have to have a rule on
>>account_login. No rule on a child table will matter.
Well i had the same perception.... In order to double check this i created
an On insert do nothing rule on the child table and did an insertion to the
master table i.e (account_login) but this time the On insert do nothing rule
did affect and no insert was done to the child table...
Note: I did not have any on insert do nothing rule on the master table.
Regards,
Talha Amjad
On 6/23/07, Jim Nasby <decibel(at)decibel(dot)org> wrote:
>
> On Jun 20, 2007, at 12:53 PM, Talha Khan wrote:
> > THE ACTUAL TEST:
> >
> > DROP RULE account_login_no_update ON account_login;
> >
> >
> > UPDATE account_login set originating_source = 'xxx';
> >
> > Now the update should not effect the child table but it does,
> > evident
> > from the output of the following query:
>
> That's because you dropped the rule that would have affected that
> query. Remember that rules effectively work on the query strings
> themselves, so to impact that update you'd have to have a rule on
> account_login. No rule on a child table will matter.
> --
> Jim Nasby jim(at)nasby(dot)net
> EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | wu_zhong_min | 2007-06-26 18:48:23 | growing disk usage problem: alternative solution? |
Previous Message | Richard Huxton | 2007-06-26 17:44:55 | Re: problem importing data with psql |