From: | Geoffrey <esoteric(at)3times25(dot)net> |
---|---|
To: | |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Order of Update - Second Try |
Date: | 2006-03-21 13:04:14 |
Message-ID: | 441FF9CE.8060500@3times25.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Terry Lee Tucker wrote:
> Hello List:
>
> I posted a question over the weekend regarding this issue but I failed to
> communicate effectively what the problem is. I was weary :o[ Let me try
> again.
>
> I have a plpgsql function which makes updates to a set of records across two
> tables in a One to Many relationship hereinafter referred to as "parent" and
> "child". The parent record contains two important sets of information that
> is relative to this process. The first is data that links the children to the
> parent. The second is data that links the parent to the to a third table that
> we will call "totals". The update to the totals table is accomplished by the
> execution of a trigger that is fired as a result of updating the child
> records. The function updates the child records in a loop and then, at the
> bottom of the function, the parent table is updated, setting to null the
> values that link it to the totals table. The problem is that the update to
> the parent table is occurring first; then, the updates to the child records
> are occurring.
I'm curious about this issue. How is this possible? I caught the
previous posting, but didn't see any responses. Is there anyway to deal
with this issue. I know I've got code that takes a similar approach and
I'm now concerned that I'm going to trash my database.
Anyone?
--
Until later, Geoffrey
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-03-21 13:15:21 | Re: Order of Update - Second Try |
Previous Message | Terry Lee Tucker | 2006-03-21 11:56:23 | Order of Update - Second Try |