Re: Order of Update - Second Try
От | Geoffrey |
---|---|
Тема | Re: Order of Update - Second Try |
Дата | |
Msg-id | 441FF9CE.8060500@3times25.net обсуждение исходный текст |
Ответ на | Order of Update - Second Try (Terry Lee Tucker <terry@esc1.com>) |
Список | 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
В списке pgsql-general по дате отправления: