aboutsummaryrefslogtreecommitdiff
path: root/contrib/pageinspect/gistfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pageinspect/gistfuncs.c')
-rw-r--r--contrib/pageinspect/gistfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c
index 029072567a4..68d59cb3ecd 100644
--- a/contrib/pageinspect/gistfuncs.c
+++ b/contrib/pageinspect/gistfuncs.c
@@ -242,8 +242,8 @@ gist_page_items(PG_FUNCTION_ARGS)
}
else
{
- tupdesc = CreateTupleDescCopy(RelationGetDescr(indexRel));
- tupdesc->natts = IndexRelationGetNumberOfKeyAttributes(indexRel);
+ tupdesc = CreateTupleDescTruncatedCopy(RelationGetDescr(indexRel),
+ IndexRelationGetNumberOfKeyAttributes(indexRel));
printflags |= RULE_INDEXDEF_KEYS_ONLY;
}