I propose to append an error message when index name and table name are
postgres@postgres=# create table t (a int not null, constraint t primary
ERROR: relation "t" already exists
End users will confusing pretty, because if users meet this message,
users will check pg_class,
but they will not found in pg_class.
in this case,
"index name must not be same relation name" error message is better.
Some RDBMS are allow that table name and constraint unique, primary key
name are same.
if they meet that message(relation "t" already exists), that message is