Set Returning Function (Pipelining)

Started by tschakover 20 years ago3 messagesgeneral
Jump to latest
#1tschak
jochen.schlosser@gmail.com

Hi everyone,

I have a question on set returning functions. In one of the TechDocs on
the postgres website it says:
"Currently SRF returning PL/pgSQL functions must generate the entire
set before the result is returned"

It also says that this might be changed in future releases (later than
7.3).
My question is now wether the result is returned linewise in an newer
version and if yes, wether a program using the
S(erver)P(rogramming)I(interface) can utilize this functionality in
order get a better distribution of the workload?

Thx for your help,

tschak

#2Joe Conway
mail@joeconway.com
In reply to: tschak (#1)
Re: Set Returning Function (Pipelining)

tschak wrote:

I have a question on set returning functions. In one of the TechDocs on
the postgres website it says:
"Currently SRF returning PL/pgSQL functions must generate the entire
set before the result is returned"

It also says that this might be changed in future releases (later than
7.3).
My question is now wether the result is returned linewise in an newer
version

I'm afraid not. But are you sure you need pipelining?

Joe

#3tschak
jochen.schlosser@gmail.com
In reply to: Joe Conway (#2)
Re: Set Returning Function (Pipelining)

I am not really sure wether I MUST use it or not, but I think it is a
nice feature to be utilized.

What I want is a long running producing up to hundred of thousands
results which have to undergo a computationally expensive
postprocessing step which needs to be execeuted in parallel. By using
pipelining I would not need to worry about partitioning the query and
thus distributing the workload.

At least as far as I understand the pipelining feature...

tschak