Re: wrong relkind error messages
От | Robert Haas |
---|---|
Тема | Re: wrong relkind error messages |
Дата | |
Msg-id | CA+TgmoYBSDvQF40+kj3tdEyS3UpjFU+yFzJytxOefBwQfkBQzA@mail.gmail.com обсуждение исходный текст |
Ответ на | wrong relkind error messages (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Ответы |
Re: wrong relkind error messages
|
Список | pgsql-hackers |
On Mon, Apr 13, 2020 at 9:55 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > Attached is another attempt to improve this. Nice effort. Most of these seem like clear improvements, but some I don't like: + errmsg("relation \"%s\" is of unsupported kind", + RelationGetRelationName(rel)), + errdetail_relkind(RelationGetRelationName(rel), rel->rd_rel->relkind))); It would help to work "pgstattuple" into the message somehow. "cannot use pgstattuple on relation \"%s\"", perhaps? + ereport(ERROR, + (errcode(ERRCODE_WRONG_OBJECT_TYPE), + errmsg("action cannot be performed on relation \"%s\"", + RelationGetRelationName(rel)), Super-vague. + errmsg("cannot set relation options of relation \"%s\"", + RelationGetRelationName(rel)), I suggest "cannot set options for relation \"%s\""; that is, use "for" instead of "of", and don't say "relation" twice. + errmsg("cannot create trigger on relation \"%s\"", + RelationGetRelationName(rel)), + errmsg("relation \"%s\" cannot have triggers", + RelationGetRelationName(rel)), + errmsg("relation \"%s\" cannot have triggers", + rv->relname), Maybe use the second wording for all three? And similarly for rules? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: