Add pg11 compatibility wrt 2cd70845240

This commit is contained in:
Julien Rouhaud 2017-10-03 18:56:22 +02:00
parent fa9a2a26e8
commit e75145cb74

View file

@ -68,7 +68,11 @@ build_index_tlist(PlannerInfo *root, IndexOptInfo *index,
att_tup = SystemAttributeDefinition(indexkey,
heapRelation->rd_rel->relhasoids);
else
#if PG_VERSION_NUM >= 110000
att_tup = TupleDescAttr(heapRelation->rd_att, indexkey - 1);
#else
att_tup = heapRelation->rd_att->attrs[indexkey - 1];
#endif
indexvar = (Expr *) makeVar(varno,
indexkey,