diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c
index e5ddd87091036961e3e7a843288bdb0c024f72f4..7af724f24bb1dbb9ea732688428986dae6928008 100644
--- a/contrib/pgstattuple/pgstattuple.c
+++ b/contrib/pgstattuple/pgstattuple.c
@@ -231,6 +231,9 @@ pgstat_relation(Relation rel, FunctionCallInfo fcinfo)
 				case GIN_AM_OID:
 					err = "gin index";
 					break;
+				case SPGIST_AM_OID:
+					err = "spgist index";
+					break;
 				default:
 					err = "unknown index";
 					break;