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