pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dave.bath@unix.net
To: pgsql-sql@postgresql.org
Subject: global variables in plpgsql?
Date: Tue, 11 Apr 2006 11:17:03 +1000
Message-ID: <200604111117.04425.dave.bath@unix.net> (raw)

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.bath@unix.net




view thread (2+ messages)  latest in thread

Message-ID: <200604111117.04425.dave.bath@unix.net>
Permalink:  ../200604111117.04425.dave.bath@unix.net/
Also on:    postgresql.org/message-id/200604111117.04425.dave.bath@unix.net

 · 

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: dave.bath@unix.net
  Subject: Re: global variables in plpgsql?
  In-Reply-To: <200604111117.04425.dave.bath@unix.net>

* 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