From f1b61aa7e2797c9c26262d8cb57acdb10cfd6bfa Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Mon, 27 Mar 2023 15:03:36 +0300 Subject: [PATCH] Normalize unique key constraint errors for identity columns --- src/test/regress/bin/normalize.sed | 3 +++ src/test/regress/expected/generated_identity.out | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/regress/bin/normalize.sed b/src/test/regress/bin/normalize.sed index 2ebb31f47..b0d1e6cab 100644 --- a/src/test/regress/bin/normalize.sed +++ b/src/test/regress/bin/normalize.sed @@ -307,3 +307,6 @@ s/(NOTICE: issuing SET LOCAL application_name TO 'citus_rebalancer gpid=)[0-9]+ # shard_rebalancer output, flaky improvement number s/improvement of 0.1[0-9]* is lower/improvement of 0.1xxxxx is lower/g + +# normalize unique key constraint errors for identity columns +s/^(ERROR: duplicate key value violates unique constraint "\w+)_([0-9])+"/\1_xxxxxx"/g diff --git a/src/test/regress/expected/generated_identity.out b/src/test/regress/expected/generated_identity.out index ecca8725f..65ea4d7c1 100644 --- a/src/test/regress/expected/generated_identity.out +++ b/src/test/regress/expected/generated_identity.out @@ -358,7 +358,7 @@ ERROR: cannot insert a non-DEFAULT value into column "color_id" DETAIL: Column "color_id" is an identity column defined as GENERATED ALWAYS. HINT: Use OVERRIDING SYSTEM VALUE to override. INSERT INTO color(color_id, color_name) OVERRIDING SYSTEM VALUE VALUES (1, 'Red'); -ERROR: duplicate key value violates unique constraint "color_color_id_key_102033" +ERROR: duplicate key value violates unique constraint "color_color_id_key_xxxxxx" DETAIL: Key (color_id)=(1) already exists. CONTEXT: while executing command on localhost:xxxxx -- update null or custom value @@ -387,7 +387,7 @@ ERROR: cannot insert a non-DEFAULT value into column "color_id" DETAIL: Column "color_id" is an identity column defined as GENERATED ALWAYS. HINT: Use OVERRIDING SYSTEM VALUE to override. INSERT INTO color(color_id, color_name) OVERRIDING SYSTEM VALUE VALUES (1, 'Red'); -ERROR: duplicate key value violates unique constraint "color_color_id_key_102033" +ERROR: duplicate key value violates unique constraint "color_color_id_key_xxxxxx" DETAIL: Key (color_id)=(1) already exists. CONTEXT: while executing command on localhost:xxxxx -- update null or custom value