Re: select sum within transaction problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bart Degryse" <Bart(dot)Degryse(at)indicator(dot)be>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: select sum within transaction problem
Date: 2007-09-12 01:09:13
Message-ID: 28187.1189559353@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Bart Degryse" <Bart(dot)Degryse(at)indicator(dot)be> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Paul Lambert 2007-09-12 01:13:00 Re: Extracting hostname from URI column
Previous Message chester c young 2007-09-12 00:42:46 Re: Extracting hostname from URI column