pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Count output lines automatically in psql/help.c
Date: Sat, 4 Jun 2022 18:18:20 +0200
Message-ID: <202206041618.2serkebdcmrz@alvherre.pgsql> (raw)
In-Reply-To: <365160.1654289490@sss.pgh.pa.us>

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





view thread (7+ messages)  latest in thread

Message-ID: <202206041618.2serkebdcmrz@alvherre.pgsql>
Permalink:  ../202206041618.2serkebdcmrz@alvherre.pgsql/
Also on:    postgresql.org/message-id/202206041618.2serkebdcmrz@alvherre.pgsql

 · 

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: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Count output lines automatically in psql/help.c
  In-Reply-To: <202206041618.2serkebdcmrz@alvherre.pgsql>

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

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