From 149b2673c244b92b59411dd2292d6ddcfb03d5d4 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 6 Mar 2011 12:10:50 -0500 Subject: [PATCH] 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 --- src/backend/access/index/indexam.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 6e6af18d47..803bb06398 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -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;