pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
global variables in plpgsql?
2+ messages / 2 participants
[nested] [flat]

* global variables in plpgsql?
@ 2006-04-11 01:17  dave.bath@unix.net
  0 siblings, 1 reply; 2+ messages in thread

From: dave.bath@unix.net @ 2006-04-11 01:17 UTC (permalink / raw)
  To: 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.bath@unix.net




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: global variables in plpgsql?
@ 2006-04-11 05:15  John DeSoi <desoi@pgedit.com>
  parent: dave.bath@unix.net
  0 siblings, 0 replies; 2+ messages in thread

From: John DeSoi @ 2006-04-11 05:15 UTC (permalink / raw)
  To: dave.bath@unix.net; +Cc: pgsql-sql


On Apr 10, 2006, at 9:17 PM, dave.bath@unix.net wrote:

> 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)

plpgsql does not have global variables.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-04-11 05:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 01:17 global variables in plpgsql? dave.bath@unix.net
2006-04-11 05:15 ` John DeSoi <desoi@pgedit.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