BUG #1711: psql doesn't format nicely with newlines - Mailing list pgsql-bugs

From
Subject BUG #1711: psql doesn't format nicely with newlines
Date
Msg-id 20050610004526.8166BF0B06@svr2.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1711
Logged by:
Email address:      david.tulloh@infaze.com.au
PostgreSQL version: 8.0.3
Operating system:   Debian Linux
Description:        psql doesn't format nicely with newlines
Details:

Printing fields with newline characters isn't handled well by psql.

select 'blah\nblah\nblah\nmore blah';
produces:
         ?column?
--------------------------
 blah
blah
blah
more blah
(1 row)

The column width appears to be the full width of the row, not compensating
for the new line characters.  It also loses the indenting, though this is
less important.

select 'blah\nblah\nblah\nmore blah', 'blah\nblah\nblah\nmore blah';
produces:
         ?column?         |         ?column?
--------------------------+--------------------------
 blah
blah
blah
more blah | blah
blah
blah
more blah
(1 row)

This one gets much harder to read:  The second column has been placed under
the first.  The table seperator is also in the wrong position.

What I expected is something like:
   ?column?   |   ?column?
--------------+--------------
 blah         | blah
 blah         | blah
 blah         | blah
 more blah    | more blah
(1 row)

pgsql-bugs by date:

Previous
From: "Placek"
Date:
Subject: BUG #1710: Not clear instruction abnout jdbc driver.
Next
From: "Gilles Dubochet"
Date:
Subject: BUG #1712: JDBC column precision for bigint is 0