Fix incorrect access to pg_index.indcollation.

Since this field is after a variable-length field, it can't simply be
accessed via the C struct for pg_index.  Fortunately, the relcache already
did the dirty work of pulling the information out to where it can be
accessed easily, so this is a one-line fix.

Andres Freund
This commit is contained in:
Tom Lane 2011-03-06 12:10:50 -05:00
parent a54ba23c08
commit 149b2673c2
1 changed files with 1 additions and 2 deletions

View File

@ -872,8 +872,7 @@ index_getprocinfo(Relation irel,
procnum, attnum, RelationGetRelationName(irel));
fmgr_info_cxt(procId, locinfo, irel->rd_indexcxt);
fmgr_info_collation(irel->rd_index->indcollation.values[attnum-1],
locinfo);
fmgr_info_collation(irel->rd_indcollation[attnum-1], locinfo);
}
return locinfo;