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

Commit c7010e8

Browse files
committed
Merge commit '573ddf552622937b625a20b137a10abedbea7d12' into PGPRO10
2 parents 41f44d4 + 573ddf5 commit c7010e8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

contrib/pg_pageprep/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)