global variables in plpgsql?
global variables in plpgsql?
От:
dave.bath@unix.net
Дата:
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
Re: global variables in plpgsql?
От:
John DeSoi <desoi@pgedit.com>
Дата:
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