@@ -2532,8 +2532,8 @@ jsonb_toaster_copy(Relation rel, JsonContainer *jc, char cmethod)
2532
2532
if (JsonContainerContainsToasted (jc ))
2533
2533
{
2534
2534
//Json *js = DatumGetJson(PointerGetDatum(jb), &jsonxContainerOps, NULL);
2535
- Json jsbuf ;
2536
- Json * js = JsonExpand (& jsbuf ,PointerGetDatum (jb ), false,& jsonxContainerOps );
2535
+ char * jsbuf = alloca ( JsonAllocSize ( jsonxContainerOps . data_size )); /* XXX */
2536
+ Json * js = JsonExpand (( Json * ) jsbuf ,PointerGetDatum (jb ), false,& jsonxContainerOps );
2537
2537
2538
2538
jsonxInit (JsonRoot (js ),PointerGetDatum (jb ));
2539
2539
@@ -2764,8 +2764,8 @@ jsonb_toaster_cmp(Relation rel, JsonContainer *new_jc, JsonContainer *old_jc, ch
2764
2764
#endif
2765
2765
{
2766
2766
//Json *js = DatumGetJson(PointerGetDatum(jb), &jsonxContainerOps, NULL);
2767
- Json jsbuf ;
2768
- Json * js = JsonExpand (& jsbuf ,PointerGetDatum (jb ), false,& jsonxContainerOps );
2767
+ char * jsbuf = alloca ( JsonAllocSize ( jsonxContainerOps . data_size )); /* XXX */
2768
+ Json * js = JsonExpand (( Json * ) jsbuf ,PointerGetDatum (jb ), false,& jsonxContainerOps );
2769
2769
2770
2770
jsonxInit (JsonRoot (js ),PointerGetDatum (jb ));
2771
2771