Re: Extract numeric filed in JSONB more effectively
От | Andy Fan |
---|---|
Тема | Re: Extract numeric filed in JSONB more effectively |
Дата | |
Msg-id | CAKU4AWoiVeBAQNXC-ih20Ck2W8=e=WT0J+OixuuC4X0ROFvrqA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Extract numeric filed in JSONB more effectively (Andy Fan <zhihui.fan1213@gmail.com>) |
Список | pgsql-hackers |
Hi:
On Mon, Aug 7, 2023 at 7:51 PM Andy Fan <zhihui.fan1213@gmail.com> wrote:
Hi Jian:Thanks for the review!compared with jsonb_numeric. I am wondering if you need a free *jb.
elog(INFO,"jb=%p arg pointer=%p ", jb, PG_GETARG_POINTER(0));
says there two are not the same.Thanks for pointing this out, I am not sure what to do right now.Basically the question is that shall we free the memory whichis allocated in a function call. The proof to do it is obvious, but theproof to NOT do it may be usually the memory is allocated underExprContext Memorycontext, it will be reset once the currenttuple is proceed, and MemoryContextReset will be more effectivethan pfrees;
I just found Andres's opinion on this, it looks like he would suggest
not free it [1], and the reason is similar here [2], so I would like to
keep it as it is.
Best Regards
Andy Fan
В списке pgsql-hackers по дате отправления: