Re: [PATCH] Fix possible overflow on tuplesort.c

2020-04-23 Thread Ranier Vilela
Em qui., 23 de abr. de 2020 às 16:43, Alvaro Herrera < alvhe...@2ndquadrant.com> escreveu: > On 2020-Apr-16, Ranier Vilela wrote: > > > When multiplying variables, the overflow will take place anyway, and only > > then will the meaningless product be explicitly promoted to type int64. > > It is on

Re: [PATCH] Fix possible overflow on tuplesort.c

2020-04-23 Thread Tom Lane
Alvaro Herrera writes: >> When multiplying variables, the overflow will take place anyway, and only >> then will the meaningless product be explicitly promoted to type int64. >> It is one of the operands that should have been cast instead to avoid the >> overflow. >> >> - if (state->availMem <

Re: [PATCH] Fix possible overflow on tuplesort.c

2020-04-23 Thread Alvaro Herrera
On 2020-Apr-16, Ranier Vilela wrote: > When multiplying variables, the overflow will take place anyway, and only > then will the meaningless product be explicitly promoted to type int64. > It is one of the operands that should have been cast instead to avoid the > overflow. > > - if (state->avai