From 5a16bad252bcd4bf1dd6a7a581af7a0fa356c45d Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 13 Feb 2021 13:31:14 -0600 Subject: [PATCH] Skip deferred constraint tests on CockroachDB --- batch_test.go | 4 ++++ query_test.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/batch_test.go b/batch_test.go index 31ddbc7e..c441abdd 100644 --- a/batch_test.go +++ b/batch_test.go @@ -597,6 +597,10 @@ 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)") + } + mustExec(t, conn, `create temporary table t ( id text primary key, n int not null, diff --git a/query_test.go b/query_test.go index b9119cf8..51ca36de 100644 --- a/query_test.go +++ b/query_test.go @@ -542,6 +542,10 @@ 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)") + } + mustExec(t, conn, `create temporary table t ( id text primary key, n int not null,