Re: Avoid use scoped block variable

2025-12-09 Thread Ranier Vilela
Em ter., 9 de dez. de 2025 às 13:19, Andres Freund escreveu: > Hi, > > On 2025-12-09 13:06:35 -0300, Ranier Vilela wrote: > > I noticed a possible violation of C rules. > > Some functions rely on local block variables, > > but this are a mistake. > > Once that block exits, the memory of the varia

Re: Avoid use scoped block variable

2025-12-09 Thread Tomas Vondra
On 12/9/25 17:06, Ranier Vilela wrote: > Hi. > > I noticed a possible violation of C rules. > Some functions rely on local block variables,  > but this are a mistake. > Once that block exits, the memory of the variable is released. > > Fix by moving the declaration variables. > When you say "po

Re: Avoid use scoped block variable

2025-12-09 Thread Andres Freund
Hi, On 2025-12-09 13:06:35 -0300, Ranier Vilela wrote: > I noticed a possible violation of C rules. > Some functions rely on local block variables, > but this are a mistake. > Once that block exits, the memory of the variable is released. CStringGetTextDatum() copies its input to a fresh allocati

Avoid use scoped block variable

2025-12-09 Thread Ranier Vilela
Hi. I noticed a possible violation of C rules. Some functions rely on local block variables, but this are a mistake. Once that block exits, the memory of the variable is released. Fix by moving the declaration variables. best regards, Ranier Vilela avoid-use-scoped-block-variable