From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bart Degryse <Bart.Degryse@indicator.be>
Cc: pgsql-sql@postgresql.org
Subject: Re: select sum within transaction problem
Date: Tue, 11 Sep 2007 21:09:13 -0400
Message-ID: <28187.1189559353@sss.pgh.pa.us> (raw)
In-Reply-To: <46E6D42C.A3DD.0030.0@indicator.be>
References: <46E6D42C.A3DD.0030.0@indicator.be>
"Bart Degryse" <Bart.Degryse@indicator.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, Bart.Degryse@indicator.be
Subject: Re: select sum within transaction problem
In-Reply-To: <28187.1189559353@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox