From ec5dfb472c73f88c456ddc99a3684f8dede1c4aa Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 13 Feb 2021 11:55:32 -0600 Subject: [PATCH] Skip domain types for CockroachDB --- conn_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conn_test.go b/conn_test.go index 0fc93dfe..90decb69 100644 --- a/conn_test.go +++ b/conn_test.go @@ -838,6 +838,11 @@ 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)") + } + var n uint64 err := conn.QueryRow(context.Background(), "select $1::uint64", "42").Scan(&n) if err != nil { @@ -852,6 +857,10 @@ 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)") + } + var n uint64 // Domain type uint64 is a PostgreSQL domain of underlying type numeric.