Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e2af60

Browse files
committed
getObjectDescription: support extended statistics
This was missed in7b504eb.Remove the "default:" clause in the switch, to avoid this problem in thefuture. Other switches involving the same enum should probably bechanged in the same way, but are not touched by this patch.Discussion:https://postgr.es/m/20170512204800.iqt2uwyx3c32j45r@alvherre.pgsql
1 parent50ee1c7 commit5e2af60

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

‎src/backend/catalog/objectaddress.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3004,6 +3004,26 @@ getObjectDescription(const ObjectAddress *object)
30043004
break;
30053005
}
30063006

3007+
caseOCLASS_STATISTIC_EXT:
3008+
{
3009+
HeapTuplestxTup;
3010+
Form_pg_statistic_extstxForm;
3011+
3012+
stxTup=SearchSysCache1(STATEXTOID,
3013+
ObjectIdGetDatum(object->objectId));
3014+
if (!HeapTupleIsValid(stxTup))
3015+
elog(ERROR,"could not find tuple for statistics object %u",
3016+
object->objectId);
3017+
3018+
stxForm= (Form_pg_statistic_ext)GETSTRUCT(stxTup);
3019+
3020+
appendStringInfo(&buffer,_("statistics object %s"),
3021+
NameStr(stxForm->stxname));
3022+
3023+
ReleaseSysCache(stxTup);
3024+
break;
3025+
}
3026+
30073027
caseOCLASS_TRANSFORM:
30083028
{
30093029
HeapTupletrfTup;
@@ -3394,13 +3414,6 @@ getObjectDescription(const ObjectAddress *object)
33943414
get_subscription_name(object->objectId));
33953415
break;
33963416
}
3397-
3398-
default:
3399-
appendStringInfo(&buffer,"unrecognized object %u %u %d",
3400-
object->classId,
3401-
object->objectId,
3402-
object->objectSubId);
3403-
break;
34043417
}
34053418

34063419
returnbuffer.data;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp