BUG #12721: psql -a does not preserve empty lines between SELECTs - Mailing list pgsql-bugs

From hans@matfyz.cz
Subject BUG #12721: psql -a does not preserve empty lines between SELECTs
Date
Msg-id 20150131173738.2581.57661@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #12721: psql -a does not preserve empty lines between SELECTs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12721
Logged by:          Hans Ginzel
Email address:      hans@matfyz.cz
PostgreSQL version: 9.4.0
Operating system:   GNU/Linux Centos 6.5
Description:

Hello!

There is, in the [doc] that psql with option -a echoes all input lines.

Try a file containing
SELECT count(*) AS N FROM information_schema.Tables;

SELECT count(*) AS N FROM information_schema.Columns;

There is an empty line between SELECTs and they are each on one line. The
output of
    cat input.sql |psql -naAF"`echo -e '\t'`" -Pfooter=off
is in my case is

SELECT count(*) AS N FROM information_schema.Tables;
n
205
SELECT count(*) AS N FROM information_schema.Columns;
n
1855

The empty line has disappeared. If there had been a comment line, it would
have been preserved. Preserve also empty lines, please.

[doc]: http://www.postgresql.org/docs/9.4/static/app-psql.html

Best regards
HG

PS: Please, is there a better way how to specify tab as delimiter?

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #12718: Apparent LWlock Problem Perhaps With Page Cleanup
Next
From: Tom Lane
Date:
Subject: Re: BUG #12721: psql -a does not preserve empty lines between SELECTs