2011/10/5 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Wed, Oct 5, 2011 at 12:16 PM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
>> * The logic of check_object_validation() got included within
>> get_relation_address(), and rewritten more smartly, as:
>>
>> + relkind = RelationGetForm(relation)->relkind;
>> + if ((objtype == OBJECT_INDEX && relkind != RELKIND_INDEX) ||
>> + (objtype == OBJECT_SEQUENCE && relkind != RELKIND_SEQUENCE) ||
>> + (objtype == OBJECT_TABLE && relkind != RELKIND_RELATION) ||
>> + (objtype == OBJECT_VIEW && relkind != RELKIND_VIEW) ||
>> + (objtype == OBJECT_FOREIGN_TABLE && relkind != RELKIND_FOREIGN_TABLE))
>> + ereport(ERROR,
>> + (errcode(ERRCODE_WRONG_OBJECT_TYPE),
>> + errmsg("\"%s\" is not a %s",
>> + NameListToString(objname),
>> + get_object_property_typetext(objtype))));
>> +
>
> That's no good. We've discussed it before. It breaks translatability.
>
Hmm. It indeed makes translation hard.
I reverted this portion of the part-2 patch, as attached.
Please review the newer one, instead of the previous revision.
Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>