TBLOCK status from libpq / libpq++
TBLOCK status from libpq / libpq++
От:
Yu Cao <yucao@falcon.kla-tencor.com>
Дата:
Is there a way I can find out whether I'm inside a transaction block (between "BEGIN" and "END") by calling some libpq function? The transaction state referred to in backend/access/transam/xact.c seems buried too deep to be accessible from libpq. Thanks for any help. --Yu Cao
Re: [INTERFACES] TBLOCK status from libpq / libpq++
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Yu Cao writes: > Is there a way I can find out whether I'm inside a transaction > block (between "BEGIN" and "END") by calling some libpq function? No, libpq has no idea what the backend's status is. If you need to know this, I suggest keeping track of it in your own application code. regards, tom lane