Re: [GENERAL] Freeing memory in native extension in case of error

2017-06-15 Thread Gabriel Furstenheim Milerud
Great, thanks On 15 June 2017 at 22:07, Tom Lane wrote: > Gabriel Furstenheim Milerud writes: >> I've written an extension in C to sum jsonb. For that I use the >> jsonbiterator defined in >> https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/jsonb_util.c#L743 > >> In the com

Re: [GENERAL] Freeing memory in native extension in case of error

2017-06-15 Thread Tom Lane
Gabriel Furstenheim Milerud writes: > I've written an extension in C to sum jsonb. For that I use the > jsonbiterator defined in > https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/jsonb_util.c#L743 > In the comments of JsonbIteratorNext it states: 'Callers in such a > scenar