"Bart Degryse" <[EMAIL PROTECTED]> writes: > I have a function like below (simplified). Everything works the way I want = > it to except for one thing. > After the select statement sum_revenues is NULL instead of the real sum. > Has this something to do with the earlier deletes and inserts not being = > committed yet?
No. I suspect the problem is hidden somewhere in the code you didn't show us. In particular you should check whether the insert/selects are actually finding anything to insert ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq