pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPLpgSQL variables persistance between several functions calls
4+ messages / 4 participants
[nested] [flat]
* PLpgSQL variables persistance between several functions calls
@ 2011-05-02 21:43 Charles N. Charotti <ccharotti@yahoo.com>
0 siblings, 2 replies; 4+ messages in thread
From: Charles N. Charotti @ 2011-05-02 21:43 UTC (permalink / raw)
To: pgsql-novice@postgresql.org; pgsql-sql
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] PLpgSQL variables persistance between several functions calls
@ 2011-05-03 02:10 Pavel Stehule <pavel.stehule@gmail.com>
parent: Charles N. Charotti <ccharotti@yahoo.com>
1 sibling, 1 reply; 4+ messages in thread
From: Pavel Stehule @ 2011-05-03 02:10 UTC (permalink / raw)
To: Charles N. Charotti <ccharotti@yahoo.com>; +Cc: pgsql-novice@postgresql.org; pgsql-sql
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
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] PLpgSQL variables persistance between several functions calls
@ 2011-05-03 10:20 Willy-Bas Loos <willybas@gmail.com>
parent: Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Willy-Bas Loos @ 2011-05-03 10:20 UTC (permalink / raw)
To: Charles N. Charotti <ccharotti@yahoo.com>; +Cc: pgsql-novice@postgresql.org, pgsql-sql@postgresql.org, Pavel Stehule <pavel.stehule@gmail.com>
Hi,
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [SQL] PLpgSQL variables persistance between several functions calls
@ 2011-05-03 11:01 Viktor Bojović <viktor.bojovic@gmail.com>
parent: Charles N. Charotti <ccharotti@yahoo.com>
1 sibling, 0 replies; 4+ messages in thread
From: Viktor Bojović @ 2011-05-03 11:01 UTC (permalink / raw)
To: Charles N. Charotti <ccharotti@yahoo.com>; +Cc: pgsql-novice@postgresql.org; pgsql-sql
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.
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2011-05-03 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 21:43 PLpgSQL variables persistance between several functions calls Charles N. Charotti <ccharotti@yahoo.com>
2011-05-03 02:10 ` Pavel Stehule <pavel.stehule@gmail.com>
2011-05-03 10:20 ` Willy-Bas Loos <willybas@gmail.com>
2011-05-03 11:01 ` Viktor Bojović <viktor.bojovic@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox