Skip to content

Commit

Permalink
The TupleConversionMap->attrMap change already happened in PG13
Browse files Browse the repository at this point in the history
  • Loading branch information
df7cb committed Nov 16, 2021
1 parent 446e2c5 commit 6ae7f94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dirtyread_tupconvert.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ dirtyread_convert_tuples_by_name(TupleDesc indesc,
map = (TupleConversionMap *) palloc(sizeof(TupleConversionMap));
map->indesc = indesc;
map->outdesc = outdesc;
#if PG_VERSION_NUM >= 140000
/* TupleConversionMap->attrMap changed in PG14; luckily our old data structure is just a member of that */
#if PG_VERSION_NUM >= 130000
/* TupleConversionMap->attrMap changed in PG13; luckily our old data structure is just a member of that */
map->attrMap = (AttrMap *) palloc(sizeof(AttrMap));
map->attrMap->attnums = attrMap;
map->attrMap->maplen = n;
Expand Down Expand Up @@ -335,7 +335,7 @@ HeapTuple
dirtyread_do_convert_tuple(HeapTuple tuple, TupleConversionMap *map, OldestXminType oldest_xmin)
{
AttrNumber *attrMap =
#if PG_VERSION_NUM >= 140000
#if PG_VERSION_NUM >= 130000
map->attrMap->attnums;
#else
map->attrMap;
Expand Down

0 comments on commit 6ae7f94

Please sign in to comment.