File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1742,12 +1742,29 @@ void *
17421742JsonEncode (const JsonbValue * val , JsonValueEncoder encoder , void * cxt )
17431743{
17441744 StringInfoData buffer ;
1745+ #if 0
1746+ MemoryContext tmpcxt ,
1747+ oldcxt ;
1748+ #endif
17451749
17461750 /* Allocate an output buffer. It will be enlarged as needed */
17471751 initStringInfo (& buffer );
17481752
1753+ #if 0
1754+ tmpcxt = AllocSetContextCreate (CurrentMemoryContext ,
1755+ "Json Encoding Context" ,
1756+ ALLOCSET_DEFAULT_MINSIZE ,
1757+ ALLOCSET_DEFAULT_INITSIZE ,
1758+ ALLOCSET_DEFAULT_MAXSIZE );
1759+ oldcxt = MemoryContextSwitchTo (tmpcxt );
1760+ #endif
1761+
17491762 (* encoder )(& buffer , val , cxt );
17501763
1764+ #if 0
1765+ MemoryContextSwitchTo (oldcxt );
1766+ MemoryContextDelete (tmpcxt );
1767+ #endif
17511768 /*
17521769 * Note: the JEntry of the root is discarded. Therefore the root
17531770 * JsonbContainer struct must contain enough information to tell what kind
You can’t perform that action at this time.
0 commit comments