getObjectDescription: support extended statistics
This was missed in 7b504eb282ca. Remove the "default:" clause in the switch, to avoid this problem in the future. Other switches involving the same enum should probably be changed in the same way, but are not touched by this patch. Discussion: https://postgr.es/m/20170512204800.iqt2uwyx3c32j45r@alvherre.pgsql
This commit is contained in:
parent
50ee1c7462
commit
5e2af609e1
@ -3004,6 +3004,26 @@ getObjectDescription(const ObjectAddress *object)
|
||||
break;
|
||||
}
|
||||
|
||||
case OCLASS_STATISTIC_EXT:
|
||||
{
|
||||
HeapTuple stxTup;
|
||||
Form_pg_statistic_ext stxForm;
|
||||
|
||||
stxTup = SearchSysCache1(STATEXTOID,
|
||||
ObjectIdGetDatum(object->objectId));
|
||||
if (!HeapTupleIsValid(stxTup))
|
||||
elog(ERROR, "could not find tuple for statistics object %u",
|
||||
object->objectId);
|
||||
|
||||
stxForm = (Form_pg_statistic_ext) GETSTRUCT(stxTup);
|
||||
|
||||
appendStringInfo(&buffer, _("statistics object %s"),
|
||||
NameStr(stxForm->stxname));
|
||||
|
||||
ReleaseSysCache(stxTup);
|
||||
break;
|
||||
}
|
||||
|
||||
case OCLASS_TRANSFORM:
|
||||
{
|
||||
HeapTuple trfTup;
|
||||
@ -3394,13 +3414,6 @@ getObjectDescription(const ObjectAddress *object)
|
||||
get_subscription_name(object->objectId));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
appendStringInfo(&buffer, "unrecognized object %u %u %d",
|
||||
object->classId,
|
||||
object->objectId,
|
||||
object->objectSubId);
|
||||
break;
|
||||
}
|
||||
|
||||
return buffer.data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user