By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
ERROR: new row for relation "mytable" violates check constraint "mytable_check" DETAIL: Failing row contains (1, 1, 1).
INSERT 0 1
ERROR: conflicting key value violates exclusion constraint "mytable_array_excl" DETAIL: Key ((ARRAY[custom_barcode, system_barcode]))=({4,2}) conflicts with existing key ((ARRAY[custom_barcode, system_barcode]))=({2,3}).