From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Maintaining blank lines in psql output?
Date: Tue, 17 Jan 2023 18:22:21 -0600
Message-ID: <bcae0f82-42f8-78ad-9faf-0072bf940125@gmail.com> (raw)
In-Reply-To: <CAKFQuwaMLnyBzoOv0oKXpcyUhS+hk29ZVj2LAS665QRG5t06Kw@mail.gmail.com>
References: <04db9247-4452-e9bb-e64a-1545e04d37bc@gmail.com>
<CAKFQuwaMLnyBzoOv0oKXpcyUhS+hk29ZVj2LAS665QRG5t06Kw@mail.gmail.com>
On 1/17/23 15:22, David G. Johnston wrote:
> On Tue, Jan 17, 2023 at 1:48 PM Ron <ronljohnsonjr@gmail.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.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Maintaining blank lines in psql output?
In-Reply-To: <bcae0f82-42f8-78ad-9faf-0072bf940125@gmail.com>
References: <04db9247-4452-e9bb-e64a-1545e04d37bc@gmail.com> <CAKFQuwaMLnyBzoOv0oKXpcyUhS+hk29ZVj2LAS665QRG5t06Kw@mail.gmail.com> <bcae0f82-42f8-78ad-9faf-0072bf940125@gmail.com>
* 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