Unclear error message
От | Laurenz Albe |
---|---|
Тема | Unclear error message |
Дата | |
Msg-id | c11c05810a9ed65e9b2c817a9ef442275a32fe80.camel@cybertec.at обсуждение исходный текст |
Ответы |
Re: Unclear error message
|
Список | pgsql-hackers |
In backend/commands/tablecmds.c, function ATAddForeignKeyConstraint, I find: if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) { if (!recurse) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("foreign key referencing partitioned table \"%s\" must not be ONLY", RelationGetRelationName(pkrel)))); That message is wrong, because "rel" and not "pkrel" is the partitioned table. I think it should be ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("foreign key cannot be defined on ONLY \"%s\" for a partitioned table", Relatio nGetRelationName(rel)))); Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления: