From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Maintaining blank lines in psql output?
Date: Tue, 17 Jan 2023 14:48:40 -0600
Message-ID: <04db9247-4452-e9bb-e64a-1545e04d37bc@gmail.com> (raw)
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?
$ cat spaces.sql
insert into foo values(1);
insert into foo values(2);
insert into foo values(3);
insert into foo values(4);
insert into bar values(1);
insert into bar values(2);
insert into bar values(3);
insert into bar values(4);
insert into snaggle values(1);
insert into snaggle values(2);
insert into snaggle values(3);
insert into snaggle values(4);
insert into frob values(1);
insert into frob values(2);
insert into frob values(3);
insert into frob values(4);
postgres@haggis:~$ psql12 test -af spaces.sql
insert into foo values(1);
INSERT 0 1
insert into foo values(2);
INSERT 0 1
insert into foo values(3);
INSERT 0 1
insert into foo values(4);
INSERT 0 1
insert into bar values(1);
INSERT 0 1
insert into bar values(2);
INSERT 0 1
insert into bar values(3);
INSERT 0 1
insert into bar values(4);
INSERT 0 1
insert into snaggle values(1);
INSERT 0 1
insert into snaggle values(2);
INSERT 0 1
insert into snaggle values(3);
INSERT 0 1
insert into snaggle values(4);
INSERT 0 1
insert into frob values(1);
INSERT 0 1
insert into frob values(2);
INSERT 0 1
insert into frob values(3);
INSERT 0 1
insert into frob values(4);
INSERT 0 1
--
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: <04db9247-4452-e9bb-e64a-1545e04d37bc@gmail.com>
References: <04db9247-4452-e9bb-e64a-1545e04d37bc@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