Re: Count output lines automatically in psql/help.c

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Count output lines automatically in psql/help.c
Date: 2022-06-10 10:16:32
Message-ID: b0957499-7e28-9038-71c5-4f4c270a5cb6@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03.06.22 22:51, Tom Lane wrote:
> + HELP0(" -c, --command=COMMAND run only single command (SQL or internal) and exit\n");
> + HELP(" -d, --dbname=DBNAME database name to connect to (default: \"%s\")\n",
> + env);

I wonder whether this mix of HELP0 and HELP is necessary. The original
code didn't care about calling fprintf even if there are no
substitutions. I think this could lead to misalignment errors. I
vaguely recall we once had mixes of fprintf and fputs and got rid of
them for this reason.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-06-10 11:48:45 Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)
Previous Message Bharath Rupireddy 2022-06-10 10:03:27 Re: A proposal to force-drop replication slots to make disabling async/sync standbys or logical replication faster in production environments