Redefine IsTransactionState() to only return true for TRANS_INPROGRESS state,

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6d6d14b6d52f7a709fba8fd23244a7de014f2048
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-06-07T21:45:59Z
Releases: 8.3.0
Redefine IsTransactionState() to only return true for TRANS_INPROGRESS state,
which is the only state in which it's safe to initiate database queries.
It turns out that all but two of the callers thought that's what it meant;
and the other two were using it as a proxy for "will GetTopTransactionId()
return a nonzero XID"?  Since it was in fact an unreliable guide to that,
make those two just invoke GetTopTransactionId() always, then deal with a
zero result if they get one.

Files