Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)

2020-06-11 Thread Ranier Vilela
Em qui., 11 de jun. de 2020 às 19:54, Tom Lane escreveu: > Ranier Vilela writes: > > elog and errmsg_internal, permits use as proposed by the patch, > > does it mean that errmsg, does not allow and does not do the same job as > > snprintf? > > Yes. errmsg() strings are captured for translation.

Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)

2020-06-11 Thread Tom Lane
Ranier Vilela writes: > elog and errmsg_internal, permits use as proposed by the patch, > does it mean that errmsg, does not allow and does not do the same job as > snprintf? Yes. errmsg() strings are captured for translation. If they contain platform-dependent substrings, that's a problem, bec

Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)

2020-06-11 Thread Ranier Vilela
Em qui., 11 de jun. de 2020 às 17:19, Alvaro Herrera < alvhe...@2ndquadrant.com> escreveu: > On 2020-Jun-11, Ranier Vilela wrote: > > > Hi, > > src/backend/commands/sequence.c > > Has two shadows (buf var), with two unnecessary variables declared. > > These are not unnecessary -- removing them bre

Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)

2020-06-11 Thread Alvaro Herrera
On 2020-Jun-11, Ranier Vilela wrote: > Hi, > src/backend/commands/sequence.c > Has two shadows (buf var), with two unnecessary variables declared. These are not unnecessary -- removing them breaks translatability of those messages. If these were ssize_t you could use '%zd' (see commit ac4ef637ad

[PATCH] fix two shadow vars (src/backend/commands/sequence.c)

2020-06-11 Thread Ranier Vilela
Hi, src/backend/commands/sequence.c Has two shadows (buf var), with two unnecessary variables declared. For readability reasons, the declaration of variable names in the prototypes was also corrected. regards, Ranier Vilela fix_shadows_buf_var.patch Description: Binary data