1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Improve psql's tabular display of wrapped-around data by inserting markers

in the formerly-always-blank columns just to left and right of the data.
Different marking is used for a line break caused by a newline in the data
than for a straight wraparound.  A newline break is signaled by a "+" in the
right margin column in ASCII mode, or a carriage return arrow in UNICODE mode.
Wraparound is signaled by a dot in the right margin as well as the following
left margin in ASCII mode, or an ellipsis symbol in the same places in UNICODE
mode.  "\pset linestyle old-ascii" is added to make the previous behavior
available if anyone really wants it.

In passing, this commit also cleans up a few regression test files that
had unintended spacing differences from the current actual output.

Roger Leigh, reviewed by Gabrielle Roth and other members of PDXPUG.
This commit is contained in:
Tom Lane
2009-11-22 05:20:41 +00:00
parent 93d3bac564
commit 1753337cf5
19 changed files with 374 additions and 260 deletions

View File

@ -829,51 +829,51 @@ DROP SERVER fdtest;
DROP FOREIGN DATA WRAPPER postgresql;
-- test asynchronous notifications
SELECT dblink_connect('dbname=contrib_regression');
dblink_connect
dblink_connect
----------------
OK
(1 row)
--should return listen
SELECT dblink_exec('LISTEN regression');
dblink_exec
dblink_exec
-------------
LISTEN
(1 row)
--should return listen
SELECT dblink_exec('LISTEN foobar');
dblink_exec
dblink_exec
-------------
LISTEN
(1 row)
SELECT dblink_exec('NOTIFY regression');
dblink_exec
dblink_exec
-------------
NOTIFY
(1 row)
SELECT dblink_exec('NOTIFY foobar');
dblink_exec
dblink_exec
-------------
NOTIFY
(1 row)
SELECT notify_name, be_pid = (select t.be_pid from dblink('select pg_backend_pid()') as t(be_pid int)) AS is_self_notify, extra from dblink_get_notify();
notify_name | is_self_notify | extra
notify_name | is_self_notify | extra
-------------+----------------+-------
regression | t |
foobar | t |
regression | t |
foobar | t |
(2 rows)
SELECT * from dblink_get_notify();
notify_name | be_pid | extra
notify_name | be_pid | extra
-------------+--------+-------
(0 rows)
SELECT dblink_disconnect();
dblink_disconnect
dblink_disconnect
-------------------
OK
(1 row)