Re: plpgsql function executed multiple times for each return value

From: David Johnston <polobo(at)yahoo(dot)com>
To: Steve Northamer <stevenorthamer(at)gmail(dot)com>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: plpgsql function executed multiple times for each return value
Date: 2011-10-08 15:50:21
Message-ID: 4852CB86-2376-4A88-9B60-255FD9CFCDC3@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> So my questions are: 1) How do we cause the paymentcalc function to be executed only once? and 2) How do we call a table returning function with inputs from a table?
>
> Thank you very much!
>
> Steve
>

WITH func AS (
SELECT FUNC(...) AS func_result FROM ...
)
SELECT (func.func_result).* FROM func

David J.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2011-10-08 16:32:01 Re: plpgsql function executed multiple times for each return value
Previous Message Jasen Betts 2011-10-08 09:19:10 Re: Edit multiple rows concurrent save