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

From Tom Lane
Subject Re: Count output lines automatically in psql/help.c
Date
Msg-id 573743.1654361819@sss.pgh.pa.us
Whole thread Raw
In response to Re: Count output lines automatically in psql/help.c  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> What about adding stringInfoCountLines or something like that?

If we have other use-cases, maybe that'd be worthwhile.

(In the committed patch, I dumbed it down to a plain per-char
loop without the strchr() complication.  So it's very little code.
I'm not real sure that strchr would make it faster.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Count output lines automatically in psql/help.c
Next
From: Phil Florent
Date:
Subject: Error from the foreign RDBMS on a foreign table I have no privilege on