I use dbms postgresql. I start a transaction

...
(!sqlQuery.exec("BEGIN;SELECT * FROM machineheadtable WHERE (machinetable_sn=10) FOR UPDATE NOWAIT"))
...

After the transaction stars is it possible to get the id of this transaction to verify afterward if is it active?

Thanks
Teo