global variables in plpgsql?

From: dave(dot)bath(at)unix(dot)net
To: pgsql-sql(at)postgresql(dot)org
Subject: global variables in plpgsql?
Date: 2006-04-11 01:17:03
Message-ID: 200604111117.04425.dave.bath@unix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Folks,

In v8.0.3 documentation, plperl, plpython and pltcl allow declaration of
variables that are global and persistent within a session.

begin_quote
37.4. Global Values in PL/Perl
You can use the global hash %_SHARED to store data, including code references,
between function calls for the lifetime of the current session.
end_quote

So, a couple of questions....
1) Can you declare global values from plpgsql?
2) If so, is there a way of avoiding namespace pollution?
(perhaps the equivalent to Oracle's use of plsql package
variables)

tia
--
David T. Bath
dave(dot)bath(at)unix(dot)net

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-04-11 02:57:57 Re: Special meaning of NL string
Previous Message Ross Johnson 2006-04-10 23:57:34 Re: how to use recursion to find end nodes of a tree