I had actually thought of this, but it seemed to me that using a temporary table was a heavy-handed approach and that a temporary scalar variable would be more efficient or less verbose to use.
It is *a* solution certainly, and potentially a better one than the url I pointed to, but I was hoping for something less bulky.
Granted, I realize that sequence generators are basically small tables like this behind the scenes, but is there any appreciable overhead of creating and dropping a temporary table for every session?