Re: Count output lines automatically in psql/help.c - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Count output lines automatically in psql/help.c
Date
Msg-id 202206041618.2serkebdcmrz@alvherre.pgsql
Whole thread Raw
In response to Count output lines automatically in psql/help.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Count output lines automatically in psql/help.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Count output lines automatically in psql/help.c
Next
From: Tom Lane
Date:
Subject: Re: Count output lines automatically in psql/help.c