John Lim wrote:
> However we need access to global variables in PL/pgSQL. I cannot find any
> mention of this in the docs. A search on google was not helpful as it just
> pointed back at the docs. Is this feature available, or do we have to use
> some of the other available languages such as PL/TCL or PL/Python?
There are no global variables natively available to PL/pgSQL. If global
across function calls, but within one backend connection, is what you
need, it would be fairly easy to write a C function to provide the
capability and then use it from PL/pgSQL.
I don't know a great deal about PL/Tcl, PL/Perl, and PL/Python, but I
believe they all have the ability to create and reference global
variables within one backend connection. I am relatively certain none
allow globals across backends.
HTH,
Joe