From: | Cédric Coulon <cedric(dot)coulon(at)lina(dot)univ-nantes(dot)fr> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Retrieve the postgres transaction id |
Date: | 2004-05-11 15:37:57 |
Message-ID: | 40A0F355.6060507@lina.univ-nantes.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Thx for yours helps.
But Isn't there a possibility that a backend has more than one
transaction with locks?
Cedric.
Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> writes:
>
>>(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'd need to qualify that more, since as-is it will also show rows for
> other locks the transaction holds. Possibly "where transaction is not
> null" will be sufficient.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Cédric Coulon cedric(dot)coulon(at)lina(dot)univ-nantes(dot)fr
Atlas group, INRIA
LINA - Université de Nantes voice: +33 (0)2 51 12 59 63
2, Rue de la Houssinière BP 92208 fax : +33 (0)2 51 12 58 97
44322 Nantes Cedex 03 France
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Zeneski | 2004-05-11 16:57:43 | Re: Result Set Cursor Patch |
Previous Message | David Wall | 2004-05-11 15:37:14 | JDBC and processing large numbers of rows |