From 727fc19cb7b51af1cef6eca65d4599f34c1c6a5f Mon Sep 17 00:00:00 2001
From: Jack Christensen <jack@jackchristensen.com>
Date: Sat, 5 Feb 2022 13:10:58 -0600
Subject: [PATCH] Another error message improvement

---
 pgtype/pgtype.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pgtype/pgtype.go b/pgtype/pgtype.go
index 45b9a092..8c4a8c49 100644
--- a/pgtype/pgtype.go
+++ b/pgtype/pgtype.go
@@ -1416,7 +1416,7 @@ func (ci *ConnInfo) Encode(oid uint32, formatCode int16, value interface{}, buf
 
 	plan := ci.PlanEncode(oid, formatCode, value)
 	if plan == nil {
-		return nil, fmt.Errorf("unable to encode %v", value)
+		return nil, fmt.Errorf("unable to encode %#v into OID %d", value, oid)
 	}
 	return plan.Encode(value, buf)
 }