2
0

PG error type is *pgconn.PgError

This commit is contained in:
Jack Christensen
2018-12-31 17:46:56 -06:00
parent 103ab963eb
commit 378ccb8945
14 changed files with 40 additions and 34 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/cockroachdb/apd"
"github.com/jackc/pgx"
"github.com/jackc/pgx/pgconn"
"github.com/jackc/pgx/pgtype"
satori "github.com/jackc/pgx/pgtype/ext/satori-uuid"
uuid "github.com/satori/go.uuid"
@@ -415,7 +416,7 @@ func TestConnQueryErrorWhileReturningRows(t *testing.T) {
rows.Scan(&n)
}
if err, ok := rows.Err().(pgx.PgError); !ok {
if err, ok := rows.Err().(*pgconn.PgError); !ok {
t.Fatalf("Expected pgx.PgError, got %v", err)
}