Thread: PLpgSQL variables persistance between several functions calls
Hello everybody !
I want to know if I could share PLpgSQL variables between different functions and within different calls just using memory (not tables or other methods).
If it is really possible ?
Thanks in advance,
Chuck
I want to know if I could share PLpgSQL variables between different functions and within different calls just using memory (not tables or other methods).
If it is really possible ?
Thanks in advance,
Chuck
Hello no, it's not possible Regards Pavel Stehule 2011/5/2 Charles N. Charotti <ccharotti@yahoo.com>: > Hello everybody ! > > I want to know if I could share PLpgSQL variables between different > functions and within different calls just using memory (not tables or other > methods). > > If it is really possible ? > > Thanks in advance, > > Chuck >
Hi,
--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw
Maybe calling a function from within another function would be a solution to you.
Cheers,
WBL
On Tue, May 3, 2011 at 4:10 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello
no, it's not possible
Regards
Pavel Stehule
2011/5/2 Charles N. Charotti <ccharotti@yahoo.com>:--> Hello everybody !
>
> I want to know if I could share PLpgSQL variables between different
> functions and within different calls just using memory (not tables or other
> methods).
>
> If it is really possible ?
>
> Thanks in advance,
>
> Chuck
>
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw
the best way is to put all calls into one function and store values to variables..
if that is not suitable you can try the way (which im not sure if anyone uses) and it is to store values to sequences if value type is integer.
for other formats you will have to do conversions.
but im not sure if sequence values are stored in database or in memory.
that way will make your results visible to all sessions.
--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me
if that is not suitable you can try the way (which im not sure if anyone uses) and it is to store values to sequences if value type is integer.
for other formats you will have to do conversions.
but im not sure if sequence values are stored in database or in memory.
that way will make your results visible to all sessions.
On Mon, May 2, 2011 at 11:43 PM, Charles N. Charotti <ccharotti@yahoo.com> wrote:
Hello everybody !
I want to know if I could share PLpgSQL variables between different functions and within different calls just using memory (not tables or other methods).
If it is really possible ?
Thanks in advance,
Chuck
--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me