Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A99561337BFB for ; Tue, 3 May 2011 08:14:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27376-01-5; Tue, 3 May 2011 11:14:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vx0-f174.google.com (mail-vx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id B77DE1337C14; Tue, 3 May 2011 08:01:12 -0300 (ADT) Received: by vxi39 with SMTP id 39so4903465vxi.19 for ; Tue, 03 May 2011 04:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=c3NcC/IuIfjrvZvX7PrsYzGJynWk9iEbx4BZTOGVelE=; b=L8D0LjI5qkxDgomvVRDmYJOel3VBIWVyzlUzDlk7iXbVMavHYL745snByD+7SvyaAF v/Q/A07YsUOKuJ898GFRLE2EAVQms8nbRuKi/L/HE217NZMWQgiAvYPCEK+BT3QT1zLA B6NUuAT4t9Vl7J4cVw7guf8o3oDIYvsigqrmQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gUbjUOT7YSRcqyseRMxCOjTKAiNl5WqvlSxPgbG/QBS2d5qrg8MjYmT2vZfrNF4bq+ U9oVs95JCv/S8sEWKnoPFPYY5mPiChtWbMTGxZLkLCZLor6JRnt09a2CxqlfP0MyQokH eRJyFLZwNRyWS+z8isWvfa+w0Ys8Wg9PPpa4k= MIME-Version: 1.0 Received: by 10.220.210.3 with SMTP id gi3mr2513774vcb.213.1304420472704; Tue, 03 May 2011 04:01:12 -0700 (PDT) Received: by 10.220.202.71 with HTTP; Tue, 3 May 2011 04:01:12 -0700 (PDT) In-Reply-To: <379871.77718.qm@web161612.mail.bf1.yahoo.com> References: <379871.77718.qm@web161612.mail.bf1.yahoo.com> Date: Tue, 3 May 2011 13:01:12 +0200 Message-ID: Subject: Re: [SQL] PLpgSQL variables persistance between several functions calls From: =?UTF-8?Q?Viktor_Bojovi=C4=87?= To: "Charles N. Charotti" Cc: pgsql-novice@postgresql.org, pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=002354188914e9d1ad04a25d0e7e X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.897 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/14 X-Sequence-Number: 25024 --002354188914e9d1ad04a25d0e7e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 w= rote: > 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 oth= er > methods). > > If it is really possible ? > > Thanks in advance, > > Chuck > --=20 --------------------------------------- Viktor Bojovi=C4=87 --------------------------------------- Wherever I go, Murphy goes with me --002354188914e9d1ad04a25d0e7e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable the best way is to put all calls into one function and store values to vari= ables..

if that is not suitable you can try the way (which im not su= re 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 se= quence values are stored in database or in memory.
that way will make yo= ur results visible to all sessions.


On Mon, May 2, 2011 at 11:43 PM, Charles N. Charotti <= ccharotti@yahoo.com> w= rote:
Hello everybody !

I want to know if I could share PLpgSQL variables = between different functions and within different calls just using memory (n= ot tables or other methods).

If it is really possible ?

Thank= s in advance,

Chuck



--
-----= ----------------------------------
Viktor Bojovi=C4=87
--------------= -------------------------
Wherever I go, Murphy goes with me
--002354188914e9d1ad04a25d0e7e--