diff --git a/batch_test.go b/batch_test.go
index 71b4137b..0b95cd47 100644
--- a/batch_test.go
+++ b/batch_test.go
@@ -18,9 +18,7 @@ func TestConnSendBatch(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server serial type is incompatible with test")
-	}
+	skipCockroachDB(t, conn, "Server serial type is incompatible with test")
 
 	sql := `create temporary table ledger(
 	  id serial primary key,
@@ -189,9 +187,7 @@ func TestConnSendBatchWithPreparedStatement(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
-	}
+	skipCockroachDB(t, conn, "Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
 
 	_, err := conn.Prepare(context.Background(), "ps1", "select n from generate_series(0,$1::int) n")
 	if err != nil {
@@ -248,9 +244,7 @@ func TestConnSendBatchWithPreparedStatementAndStatementCacheDisabled(t *testing.
 	conn := mustConnect(t, config)
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
-	}
+	skipCockroachDB(t, conn, "Server issues incorrect ParameterDescription (https://github.com/cockroachdb/cockroach/issues/60907)")
 
 	_, err = conn.Prepare(context.Background(), "ps1", "select n from generate_series(0,$1::int) n")
 	if err != nil {
@@ -605,9 +599,7 @@ func TestConnBeginBatchDeferredError(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
-	}
+	skipCockroachDB(t, conn, "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
 
 	mustExec(t, conn, `create temporary table t (
 		id text primary key,
diff --git a/conn_test.go b/conn_test.go
index 7e10d179..984a5114 100644
--- a/conn_test.go
+++ b/conn_test.go
@@ -535,9 +535,7 @@ func TestListenNotifyWhileBusyIsSafe(t *testing.T) {
 			listenerDone <- true
 		}()
 
-		if conn.PgConn().ParameterStatus("crdb_version") != "" {
-			t.Skip("Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
-		}
+		skipCockroachDB(t, conn, "Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
 
 		mustExec(t, conn, "listen busysafe")
 
@@ -582,9 +580,7 @@ func TestListenNotifyWhileBusyIsSafe(t *testing.T) {
 			notifierDone <- true
 		}()
 
-		if conn.PgConn().ParameterStatus("crdb_version") != "" {
-			t.Skip("Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
-		}
+		skipCockroachDB(t, conn, "Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
 
 		for i := 0; i < 100000; i++ {
 			mustExec(t, conn, "notify busysafe, 'hello'")
@@ -602,9 +598,7 @@ func TestListenNotifySelfNotification(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
-	}
+	skipCockroachDB(t, conn, "Server does not support LISTEN / NOTIFY (https://github.com/cockroachdb/cockroach/issues/41522)")
 
 	mustExec(t, conn, "listen self")
 
@@ -639,9 +633,7 @@ func TestFatalRxError(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support pg_terminate_backend() (https://github.com/cockroachdb/cockroach/issues/35897)")
-	}
+	skipCockroachDB(t, conn, "Server does not support pg_terminate_backend() (https://github.com/cockroachdb/cockroach/issues/35897)")
 
 	var wg sync.WaitGroup
 	wg.Add(1)
@@ -679,9 +671,7 @@ func TestFatalTxError(t *testing.T) {
 			conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 			defer closeConn(t, conn)
 
-			if conn.PgConn().ParameterStatus("crdb_version") != "" {
-				t.Skip("Server does not support pg_terminate_backend() (https://github.com/cockroachdb/cockroach/issues/35897)")
-			}
+			skipCockroachDB(t, conn, "Server does not support pg_terminate_backend() (https://github.com/cockroachdb/cockroach/issues/35897)")
 
 			otherConn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 			defer otherConn.Close(context.Background())
@@ -846,10 +836,7 @@ func TestConnInitConnInfo(t *testing.T) {
 
 func TestUnregisteredTypeUsableAsStringArgumentAndBaseResult(t *testing.T) {
 	testWithAndWithoutPreferSimpleProtocol(t, func(t *testing.T, conn *pgx.Conn) {
-
-		if conn.PgConn().ParameterStatus("crdb_version") != "" {
-			t.Skip("Server does support domain types (https://github.com/cockroachdb/cockroach/issues/27796)")
-		}
+		skipCockroachDB(t, conn, "Server does support domain types (https://github.com/cockroachdb/cockroach/issues/27796)")
 
 		var n uint64
 		err := conn.QueryRow(context.Background(), "select $1::uint64", "42").Scan(&n)
@@ -865,9 +852,7 @@ func TestUnregisteredTypeUsableAsStringArgumentAndBaseResult(t *testing.T) {
 
 func TestDomainType(t *testing.T) {
 	testWithAndWithoutPreferSimpleProtocol(t, func(t *testing.T, conn *pgx.Conn) {
-		if conn.PgConn().ParameterStatus("crdb_version") != "" {
-			t.Skip("Server does support domain types (https://github.com/cockroachdb/cockroach/issues/27796)")
-		}
+		skipCockroachDB(t, conn, "Server does support domain types (https://github.com/cockroachdb/cockroach/issues/27796)")
 
 		var n uint64
 
diff --git a/copy_from_test.go b/copy_from_test.go
index 93f583b8..58eb946c 100644
--- a/copy_from_test.go
+++ b/copy_from_test.go
@@ -134,9 +134,7 @@ func TestConnCopyFromLarge(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Skipping due to known server issue: (https://github.com/cockroachdb/cockroach/issues/52722)")
-	}
+	skipCockroachDB(t, conn, "Skipping due to known server issue: (https://github.com/cockroachdb/cockroach/issues/52722)")
 
 	mustExec(t, conn, `create temporary table foo(
 		a int2,
diff --git a/helper_test.go b/helper_test.go
index 6c532035..b9cd21c1 100644
--- a/helper_test.go
+++ b/helper_test.go
@@ -2,10 +2,11 @@ package pgx_test
 
 import (
 	"context"
-	"github.com/stretchr/testify/assert"
 	"os"
 	"testing"
 
+	"github.com/stretchr/testify/assert"
+
 	"github.com/jackc/pgconn"
 	"github.com/jackc/pgx/v4"
 	"github.com/stretchr/testify/require"
@@ -164,3 +165,9 @@ func assertConfigsEqual(t *testing.T, expected, actual *pgx.ConnConfig, testName
 		}
 	}
 }
+
+func skipCockroachDB(t testing.TB, conn *pgx.Conn, msg string) {
+	if conn.PgConn().ParameterStatus("crdb_version") != "" {
+		t.Skip(msg)
+	}
+}
diff --git a/large_objects_test.go b/large_objects_test.go
index 71e2df73..672729ee 100644
--- a/large_objects_test.go
+++ b/large_objects_test.go
@@ -22,9 +22,7 @@ func TestLargeObjects(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does support large objects")
-	}
+	skipCockroachDB(t, conn, "Server does support large objects")
 
 	tx, err := conn.Begin(ctx)
 	if err != nil {
@@ -52,9 +50,7 @@ func TestLargeObjectsPreferSimpleProtocol(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does support large objects")
-	}
+	skipCockroachDB(t, conn, "Server does support large objects")
 
 	tx, err := conn.Begin(ctx)
 	if err != nil {
@@ -173,9 +169,7 @@ func TestLargeObjectsMultipleTransactions(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does support large objects")
-	}
+	skipCockroachDB(t, conn, "Server does support large objects")
 
 	tx, err := conn.Begin(ctx)
 	if err != nil {
diff --git a/query_test.go b/query_test.go
index e41eb31d..54149e81 100644
--- a/query_test.go
+++ b/query_test.go
@@ -542,9 +542,7 @@ func TestConnQueryDeferredError(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
-	}
+	skipCockroachDB(t, conn, "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
 
 	mustExec(t, conn, `create temporary table t (
 	id text primary key,
@@ -586,9 +584,7 @@ func TestConnQueryErrorWhileReturningRows(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server uses numeric instead of int")
-	}
+	skipCockroachDB(t, conn, "Server uses numeric instead of int")
 
 	for i := 0; i < 100; i++ {
 		func() {
@@ -1365,9 +1361,7 @@ func TestQueryContextErrorWhileReceivingRows(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server uses numeric instead of int")
-	}
+	skipCockroachDB(t, conn, "Server uses numeric instead of int")
 
 	ctx, cancelFunc := context.WithCancel(context.Background())
 	defer cancelFunc()
@@ -1889,9 +1883,7 @@ func TestConnSimpleProtocolRefusesNonUTF8ClientEncoding(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support changing client_encoding (https://www.cockroachlabs.com/docs/stable/set-vars.html)")
-	}
+	skipCockroachDB(t, conn, "Server does not support changing client_encoding (https://www.cockroachlabs.com/docs/stable/set-vars.html)")
 
 	mustExec(t, conn, "set client_encoding to 'SQL_ASCII'")
 
@@ -1915,9 +1907,7 @@ func TestConnSimpleProtocolRefusesNonStandardConformingStrings(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support standard_conforming_strings = off (https://github.com/cockroachdb/cockroach/issues/36215)")
-	}
+	skipCockroachDB(t, conn, "Server does not support standard_conforming_strings = off (https://github.com/cockroachdb/cockroach/issues/36215)")
 
 	mustExec(t, conn, "set standard_conforming_strings to off")
 
diff --git a/tx_test.go b/tx_test.go
index 2df01e73..7634ea59 100644
--- a/tx_test.go
+++ b/tx_test.go
@@ -106,9 +106,7 @@ func TestTxCommitWhenDeferredConstraintFailure(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
-	}
+	skipCockroachDB(t, conn, "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
 
 	createSql := `
     create temporary table foo(
@@ -275,9 +273,7 @@ func TestBeginIsoLevels(t *testing.T) {
 	conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
 	defer closeConn(t, conn)
 
-	if conn.PgConn().ParameterStatus("crdb_version") != "" {
-		t.Skip("Server always uses SERIALIZABLE isolation (https://www.cockroachlabs.com/docs/stable/demo-serializable.html)")
-	}
+	skipCockroachDB(t, conn, "Server always uses SERIALIZABLE isolation (https://www.cockroachlabs.com/docs/stable/demo-serializable.html)")
 
 	isoLevels := []pgx.TxIsoLevel{pgx.Serializable, pgx.RepeatableRead, pgx.ReadCommitted, pgx.ReadUncommitted}
 	for _, iso := range isoLevels {
diff --git a/values_test.go b/values_test.go
index 9e8669fa..1c744cad 100644
--- a/values_test.go
+++ b/values_test.go
@@ -742,9 +742,7 @@ func TestPointerPointer(t *testing.T) {
 	t.Parallel()
 
 	testWithAndWithoutPreferSimpleProtocol(t, func(t *testing.T, conn *pgx.Conn) {
-		if conn.PgConn().ParameterStatus("crdb_version") != "" {
-			t.Skip("Server auto converts ints to bigint and test relies on exact types")
-		}
+		skipCockroachDB(t, conn, "Server auto converts ints to bigint and test relies on exact types")
 
 		type allTypes struct {
 			s   *string