Re: free C string

2021-07-14 Thread Tom Lane
Zhihong Yu writes: > On Wed, Jul 14, 2021 at 10:17 AM Tom Lane wrote: >> There's really very little point in adding such code. Our memory >> context mechanisms take care of minor leaks like this, with less >> code and fewer cycles expended than explicit pfree calls require. >> It's worth trying

Re: free C string

2021-07-14 Thread Zhihong Yu
On Wed, Jul 14, 2021 at 10:17 AM Tom Lane wrote: > Zhihong Yu writes: > > I was looking at fmgr_internal_validator(). > > It seems prosrc is only used internally. > > The patch frees the C string prosrc points to, prior to returning. > > There's really very little point in adding such code. Our

Re: free C string

2021-07-14 Thread Tom Lane
Zhihong Yu writes: > I was looking at fmgr_internal_validator(). > It seems prosrc is only used internally. > The patch frees the C string prosrc points to, prior to returning. There's really very little point in adding such code. Our memory context mechanisms take care of minor leaks like this,

free C string

2021-07-14 Thread Zhihong Yu
Hi, I was looking at fmgr_internal_validator(). It seems prosrc is only used internally. The patch frees the C string prosrc points to, prior to returning. Please take a look. Thanks free-c-str.patch Description: Binary data