@@ -391,6 +391,13 @@ typedef struct RumState
391391Oid supportCollation [INDEX_MAX_KEYS ];
392392}RumState ;
393393
394+ /* Accessor for the i'th attribute of tupdesc. */
395+ #if PG_VERSION_NUM > 100000
396+ #define RumTupleDescAttr (tupdesc ,i ) (TupleDescAttr(tupdesc, i))
397+ #else
398+ #define RumTupleDescAttr (tupdesc ,i ) ((tupdesc)->attrs[(i)])
399+ #endif
400+
394401/* rumutil.c */
395402extern bytea * rumoptions (Datum reloptions ,bool validate );
396403extern Datum rumhandler (PG_FUNCTION_ARGS );
@@ -662,7 +669,7 @@ typedef struct RumScanEntryData
662669 * For a partial-match or full-scan query, we accumulate all TIDs and
663670 * and additional information here
664671 */
665- Tuplesortstate * matchSortstate ;
672+ RumTuplesortstate * matchSortstate ;
666673RumScanItem collectRumItem ;
667674
668675/* for full-scan query with order-by */
@@ -722,7 +729,7 @@ typedef struct RumScanOpaqueData
722729uint32 allocentries ;/* allocated length of entries[] and
723730 sortedEntries[] */
724731
725- Tuplesortstate * sortstate ;
732+ RumTuplesortstate * sortstate ;
726733int norderbys ;/* Number of columns in ordering.
727734 Will be assigned to sortstate->nKeys */
728735