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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Count output lines automatically in psql/help.c
Date: 2022-06-04 16:18:20
Message-ID: 202206041618.2serkebdcmrz@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Jun-03, Tom Lane wrote:

> So, attached is a patch to remove that maintenance chore by
> constructing the output in a PQExpBuffer and then counting the
> lines automatically. While I was at it, I introduced a couple of
> macros to make the code shorter rather than longer.

What about adding stringInfoCountLines or something like that?

--
Álvaro Herrera

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-06-04 16:56:59 Re: Count output lines automatically in psql/help.c
Previous Message Tom Lane 2022-06-04 15:54:42 Re: Count output lines automatically in psql/help.c