pgsql: pg_resetwal: Use separate flags for whether an option is given

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_resetwal: Use separate flags for whether an option is given
Date: 2025-12-08 14:56:17
Message-ID: E1vSceu-003Rvm-1g@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_resetwal: Use separate flags for whether an option is given

Currently, we use special values that are otherwise invalid for each
option to indicate "option was not given". Replace that with separate
boolean variables for each option. It seems more clear to be explicit.

We were already doing that for the -m option, because there were no
invalid values for nextMulti that we could use (since commit
94939c5f3a).

Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/81adf5f3-36ad-4bcd-9ba5-1b95c7b7a807@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/978cf02bb8caeafd6fe5178e67016ffd898599b4

Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 166 ++++++++++++++++++++++----------------
1 file changed, 95 insertions(+), 71 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2025-12-08 15:32:15 pgsql: Unify error messages
Previous Message Peter Eisentraut 2025-12-08 14:54:27 pgsql: Make ecpg parse.pl more robust with braces