legrand legrand <legrand_legrand@xxxxxxxxxxx> writes: > I thougth that thoses messages where using relation's relkind: > .. > wouldn't it be easier to read for beginners ? I doubt it would be an improvement. Consider this example: regression=# create table t1 (f1 int); CREATE TABLE regression=# create materialized view mv1 as select * from t1; SELECT 0 regression=# create index mv1 on t1 (f1); ERROR: relation "mv1" already exists You seem to be proposing that the error should read either ERROR: index "mv1" already exists which would be a lie, or ERROR: materialized view "mv1" already exists which while accurate seems to me to be *more* confusing not less. A person who did not understand that these relation types all share the same namespace would probably not get enlightened this way. Using the generic term "relation" is just as accurate, and it might help somebody understand that the problem is exactly that relations of different types share the same namespace. regards, tom lane