Re: plpgsql function executed multiple times for each return value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Northamer <stevenorthamer(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: plpgsql function executed multiple times for each return value
Date: 2011-10-08 16:32:01
Message-ID: 11372.1318091521@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Steve Northamer <stevenorthamer(at)gmail(dot)com> writes:
> So my questions are: 1) How do we cause the paymentcalc function to be
> executed only once?

In recent versions, I think marking it volatile would be sufficient.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message F. BROUARD / SQLpro 2011-10-09 10:22:57 [GENERAL] Creating rule for sliding data
Previous Message David Johnston 2011-10-08 15:50:21 Re: plpgsql function executed multiple times for each return value