From: Oliver Jowett <oliver@opencloud.com>
To: Cédric Coulon <cedric.coulon@lina.univ-nantes.fr>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Retrieve the postgres transaction id
Date: Wed, 12 May 2004 02:16:51 +1200
Message-ID: <40A0E053.4090308@opencloud.com> (raw)
In-Reply-To: <40A0CFF6.502@lina.univ-nantes.fr>
References: <40A0CFF6.502@lina.univ-nantes.fr>
Cédric Coulon wrote:
> Hi,
>
> Is there a way to retrieve the postgres transaction id using JDBC?
There's no special JDBC path for doing this.
(later) A bit of experimentation yields this (I'm sure there's a better
way):
select transaction from pg_locks where pid = pg_backend_pid();
You should be able to run that as a normal query through JDBC.
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, cedric.coulon@lina.univ-nantes.fr
Subject: Re: Retrieve the postgres transaction id
In-Reply-To: <40A0E053.4090308@opencloud.com>
References: <40A0CFF6.502@lina.univ-nantes.fr> <40A0E053.4090308@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox