aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r--src/backend/commands/analyze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 2b638271b3d..fbad13ea94f 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -871,7 +871,7 @@ compute_index_stats(Relation onerel, double totalrows,
static VacAttrStats *
examine_attribute(Relation onerel, int attnum, Node *index_expr)
{
- Form_pg_attribute attr = onerel->rd_att->attrs[attnum - 1];
+ Form_pg_attribute attr = TupleDescAttr(onerel->rd_att, attnum - 1);
HeapTuple typtuple;
VacAttrStats *stats;
int i;