lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Feature request - session global variables (as in DB2 9.7) #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.sql.ref.doc/doc/r0050503.html

small part from there: "DB2® supports created session global variables. A 
session global variable is associated with a specific session, and 
contains a value that is unique to that session. A created session global 
variable is available to any active SQL statement running against the 
database on which the variable was defined. A session global variable can 
be associated with more than one session, but its value will be specific 
to each session. Created session global variables and the privileges that 
are associated with them are defined in the system catalog."

It would be great to have something like this in H2.
It is especially useful in triggers, with help of session global variables 
one could "logically" turn off trigger(s) only for desired session and 
other sessions would not affected.

As of now it could be partially emulated with local temptables, but with a 
lot of boilerplate and pain.

There should be api for manipulation with session global variables from 
SQL and java(triggers).

Original issue reported on code.google.com by kua...@gmail.com on 7 Oct 2009 at 3:38

GoogleCodeExporter commented 9 years ago
Moved to the roadmap.

Original comment by thomas.t...@gmail.com on 7 Oct 2009 at 7:12