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 *
1742
1742
JsonEncode (const JsonbValue * val , JsonValueEncoder encoder , void * cxt )
1743
1743
{
1744
1744
StringInfoData buffer ;
1745
+ #if 0
1746
+ MemoryContext tmpcxt ,
1747
+ oldcxt ;
1748
+ #endif
1745
1749
1746
1750
/* Allocate an output buffer. It will be enlarged as needed */
1747
1751
initStringInfo (& buffer );
1748
1752
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
+
1749
1762
(* encoder )(& buffer , val , cxt );
1750
1763
1764
+ #if 0
1765
+ MemoryContextSwitchTo (oldcxt );
1766
+ MemoryContextDelete (tmpcxt );
1767
+ #endif
1751
1768
/*
1752
1769
* Note: the JEntry of the root is discarded. Therefore the root
1753
1770
* JsonbContainer struct must contain enough information to tell what kind
You can’t perform that action at this time.
0 commit comments