Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 573ddf5

Browse files
committed
fix for 9.6
1 parent 9c87ed1 commit 573ddf5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pg_pageprep.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,8 +1723,17 @@ print_tuple(TupleDesc tupdesc, HeapTuple tuple)
17231723
static void (*orig_intorel_startup)
17241724
(DestReceiver *self, int operation, TupleDesc typeinfo) = NULL;
17251725

1726+
/*
1727+
* Returns MemoryContext for the specified pointer. See GetMemoryChunkContext()
1728+
* for details.
1729+
*/
1730+
#if PG_VERSION_NUM >= 100000
17261731
#define PointerMemoryContext(pointer) \
17271732
(*(MemoryContext *) (((char *) pointer) - sizeof(void *)))
1733+
#else
1734+
#define PointerMemoryContext(pointer) \
1735+
(GetMemoryChunkContext(pointer))
1736+
#endif
17281737

17291738
static void
17301739
our_intorel_startup(DestReceiver *self, int operation, TupleDesc typeinfo)

0 commit comments

Comments
 (0)