Re: Maintaining blank lines in psql output?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Maintaining blank lines in psql output?
Date: 2023-01-18 00:22:21
Message-ID: bcae0f82-42f8-78ad-9faf-0072bf940125@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/17/23 15:22, David G. Johnston wrote:
> On Tue, Jan 17, 2023 at 1:48 PM Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
>
>
> White space can of course make things easy to read, but psql seems to
> ignore
> those blank lines.  Is there any way to retain them in psql output?
>
>
> Nope, there is no setting for psql to print all blank lines it encounters
> to stdout.  If you want to format your output with stuff other than query
> results it provides \echo

\echo is exactly what I want, not only because of it's simplicity but since
it doesn't generate numbers when \timing is enabled.

(The primary use is for sql scripts generated by bash scripts and run from
cron, where stdout and stderr are redirected to a log file.)

--
Born in Arizona, moved to Babylonia.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-01-18 05:27:42 Re: Tablespace OID, database OID, relfilenode
Previous Message raf 2023-01-17 23:21:26 Re: Maintaining blank lines in psql output?