Discussion:
call pl/pgsql function from main pl/pgsql function
Mehdi Ravanbakhsh
2014-09-28 12:19:03 UTC
Permalink
Hi All

I have one main function in pl/pgsql and one subset function in pl/pgsql .

i need to call Subset Function From main function and i do not need to
wait for subset Function return. I just need to send parameter to subset
function and do not need any thing in return.

So i can call multiply subset function repeatedly.

Any one can help with this problem ?
David G Johnston
2014-09-28 13:19:01 UTC
Permalink
Post by Mehdi Ravanbakhsh
Hi All
I have one main function in pl/pgsql and one subset function in pl/pgsql .
i need to call Subset Function From main function and i do not need to
wait for subset Function return. I just need to send parameter to subset
function and do not need any thing in return.
So i can call multiply subset function repeatedly.
Any one can help with this problem ?
All functions are synchronous. Best you can do is write the sub function to
return quickly by, for instance, having it simply write to a table and have
a task processor handle the work in a separate session.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/call-pl-pgsql-function-from-main-pl-pgsql-function-tp5820818p5820820.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Jov
2014-09-28 13:41:14 UTC
Permalink
Plain pg function is synchronization,the main function must wait for the
sub function over.
I rember dblink can send asynchronous query,maybe you can wrap your sub
function with dblink.but transition behavior should be careful thought.
Post by Mehdi Ravanbakhsh
Hi All
I have one main function in pl/pgsql and one subset function in pl/pgsql .
i need to call Subset Function From main function and i do not need to
wait for subset Function return. I just need to send parameter to subset
function and do not need any thing in return.
So i can call multiply subset function repeatedly.
Any one can help with this problem ?
Loading...