Hi Thomas,

On 16/06/2011 12:22 AM, Thomas Mueller wrote:
But I am truly blocked on this issue.
As I already described, this can be implemented using a sequence and a
session variable. To simplify using it, you could also write a user
defined function.

The part I was blocked on was differentiating between different transactions in the same session. User variables span multiple transactions so there is no way of knowing that you have to invoke NEXTVAL on the second transaction of the same session.

If this is not what you want: the spirit of open source is that if you
are blocked by a feature, you implement it yourself and provide a
patch :-)

Anyway, I understand your request of course and I will add two feature requests:
- TRANSACTION_ID() for In-memory databases.
- TRANSACTION_ID() should be long (same as HSQLDB and PostgreSQL).

I think there is a legitimate need for two separate methods: one that returns a long that uniquely identifies a transaction within the current database, and another one that returns a String that uniquely identifies the database across the world. We can then join the two to generate a transaction UUID as follows: <database UUID>-<transaction id>.

I'm personally only interested in the local transaction id (for in-memory or on disk databases).

Thanks,
Gili

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to