Connection local variables?

Started by Steve - DNDalmost 21 years ago2 messagesgeneral
Jump to latest
#1Steve - DND
postgres@digitalnothing.com

Is there a way to create a variable specific to the current working
connection? Like a connection context or some such? I'm trying to take a
variable in a query, and allow it to be used by a rule.

Thanks,
Steve

#2Richard Huxton
dev@archonet.com
In reply to: Steve - DND (#1)
Re: Connection local variables?

Steve - DND wrote:

Is there a way to create a variable specific to the current working
connection? Like a connection context or some such? I'm trying to take a
variable in a query, and allow it to be used by a rule.

You can create functions in a language that allows global storage.
Search in the archives for "app_session tcl" for examples of what I use.
http://archives.postgresql.org/

--
Richard Huxton
Archonet Ltd