From 7adabc9b93697c46b98c18c30f043910fb41ffba Mon Sep 17 00:00:00 2001 From: Manni Wood Date: Mon, 5 Sep 2016 10:59:24 -0400 Subject: [PATCH] Improves documentation of Xid type --- values.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/values.go b/values.go index e3486bed..80bd3ed8 100644 --- a/values.go +++ b/values.go @@ -329,9 +329,23 @@ func (n NullInt32) Encode(w *WriteBuf, oid Oid) error { return encodeInt32(w, oid, n.Int32) } +// Xid is PostgreSQL's Transaction ID type. +// +// In later versions of PostgreSQL, it is the type used for the backend_xid +// and backend_xmin columns of the pg_stat_activity system view. +// +// Also, when one does +// +// select xmin, xmax, * from some_table; +// +// it is the data type of the xmin and xmax hidden system columns. +// +// It is currently implemented as an unsigned for byte integer. +// Its definition can be found in src/include/postgres_ext.h as TransactionId +// in the PostgreSQL sources. type Xid uint32 -// NullXid represents a transaction ID (Xid) that may be null. NullXid implements the +// NullXid represents a Transaction ID (Xid) that may be null. NullXid implements the // Scanner and Encoder interfaces so it may be used both as an argument to // Query[Row] and a destination for Scan. //