pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viktor Bojović <viktor.bojovic@gmail.com>
To: Charles N. Charotti <ccharotti@yahoo.com>
Cc: pgsql-novice@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] PLpgSQL variables persistance between several functions calls
Date: Tue, 3 May 2011 13:01:12 +0200
Message-ID: <BANLkTinjBmTvgbpDXvb8y1RBTLrMfeE5eQ@mail.gmail.com> (raw)
In-Reply-To: <379871.77718.qm@web161612.mail.bf1.yahoo.com>
References: <379871.77718.qm@web161612.mail.bf1.yahoo.com>

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

view thread (4+ messages)

Message-ID: <BANLkTinjBmTvgbpDXvb8y1RBTLrMfeE5eQ@mail.gmail.com>
Permalink:  ../BANLkTinjBmTvgbpDXvb8y1RBTLrMfeE5eQ@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTinjBmTvgbpDXvb8y1RBTLrMfeE5eQ@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: viktor.bojovic@gmail.com, ccharotti@yahoo.com, pgsql-novice@postgresql.org
  Subject: Re: [SQL] PLpgSQL variables persistance between several functions calls
  In-Reply-To: <BANLkTinjBmTvgbpDXvb8y1RBTLrMfeE5eQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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