Accept type name in duplicate key error message
authorTomas Vondra <[email protected]>
Sun, 16 Jul 2017 18:52:59 +0000 (20:52 +0200)
committerTomas Vondra <[email protected]>
Sun, 16 Jul 2017 18:52:59 +0000 (20:52 +0200)
The output routine for anyarray data type (anyarray_out) is modified to
include name of the data type in the text representation. Which is also
used when an error message includes the value, for example duplicate
key errors.

src/test/regress/expected/domain.out

index 409c28d764a61ea2bacf60bf5e035dcfc6e55f6c..6f65a6e81c83587dd84e972a84019075687c2dc3 100644 (file)
@@ -207,7 +207,7 @@ insert into dcomptable values (array[row(3,4), row(5,6)]::comptype[]);
 insert into dcomptable values (array[row(7,8)::comptype, row(9,10)::comptype]);
 insert into dcomptable values (array[row(1,2)]::dcomptypea);  -- fail on uniqueness
 ERROR:  duplicate key value violates unique constraint "dcomptable_d1_key"
-DETAIL:  Key (d1)=({"(1,2)"}) already exists.
+DETAIL:  Key (d1)=((public.comptype){"(1,2)"}) already exists.
 insert into dcomptable (d1[1]) values(row(9,10));
 insert into dcomptable (d1[1].r) values(11);
 select * from dcomptable;