BUG #1711: psql doesn't format nicely with newlines

From: "" <david(dot)tulloh(at)infaze(dot)com(dot)au>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1711: psql doesn't format nicely with newlines
Date: 2005-06-10 00:45:26
Message-ID: 20050610004526.8166BF0B06@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1711
Logged by:
Email address: david(dot)tulloh(at)infaze(dot)com(dot)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)

Browse pgsql-bugs by date

  From Date Subject
Next Message Gilles Dubochet 2005-06-10 13:28:29 BUG #1712: JDBC column precision for bigint is 0
Previous Message Placek 2005-06-09 10:55:16 BUG #1710: Not clear instruction abnout jdbc driver.