Proposal: add error message in backend/catalog/index.c

From: Ioseph Kim <pgsql-kr(at)postgresql(dot)kr>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Proposal: add error message in backend/catalog/index.c
Date: 2016-12-13 06:15:20
Message-ID: 48b4e455-13c6-f1c5-5b73-353539b442ab@postgresql.kr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I propose to append an error message when index name and table name are
same.

example:

postgres(at)postgres=# create table t (a int not null, constraint t primary
key (a));
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
not clear.

Regards, Ioseph

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2016-12-13 06:36:33 Re: Parallel bitmap heap scan
Previous Message Kyotaro HORIGUCHI 2016-12-13 06:11:03 Re: Radix tree for character conversion