From e276d9b832bfd155cb35b9080b21827bc5d0f996 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Wed, 23 Dec 2020 12:21:34 -0600 Subject: [PATCH] Add more documentation to TxStatus --- pgconn.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pgconn.go b/pgconn.go index 3652cedb..53e32252 100644 --- a/pgconn.go +++ b/pgconn.go @@ -512,7 +512,14 @@ func (pgConn *PgConn) PID() uint32 { return pgConn.pid } -// TxStatus returns the current TxStatus as reported by the server. +// TxStatus returns the current TxStatus as reported by the server in the ReadyForQuery message. +// +// Possible return values: +// 'I' - idle / not in transaction +// 'T' - in a transaction +// 'E' - in a failed transaction +// +// See https://www.postgresql.org/docs/current/protocol-message-formats.html. func (pgConn *PgConn) TxStatus() byte { return pgConn.txStatus }