public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chao Li <[email protected]>
To: Euler Taveira <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: japin <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: log_min_messages per backend type
Date: Thu, 11 Dec 2025 10:11:05 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>



> On Dec 11, 2025, at 09:57, Euler Taveira <[email protected]> wrote:
> 
> 
>> In the “if” and “else” clauses, there are duplicate code to valid log 
>> levels. We should refactor the code to avoid the duplication. For 
>> example, pull up “loglevel” to the “for” loop level, then we can valid 
>> it after the “if-else”.
>> 
> 
> The for loop is duplicate but if you create a separate function for it but the
> result is:
> 
> src/backend/commands/variable.c | 43 ++++++++++++++++++++++---------------------
> 1 file changed, 22 insertions(+), 21 deletions(-)
> 
> 

I don’t think we need to add a separate function. We can use ‘if-else” to parse log level, then verify it after “if-else”.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/









view thread (20+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: log_min_messages per backend type
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox