Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1753337

Browse files
committed
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.
1 parent 93d3bac commit 1753337

File tree

19 files changed

+374
-260
lines changed

19 files changed

+374
-260
lines changed

contrib/dblink/expected/dblink.out

+10-10
Original file line numberDiff line numberDiff line change
@@ -829,51 +829,51 @@ DROP SERVER fdtest;
829829
DROP FOREIGN DATA WRAPPER postgresql;
830830
-- test asynchronous notifications
831831
SELECT dblink_connect('dbname=contrib_regression');
832-
dblink_connect
832+
dblink_connect
833833
----------------
834834
OK
835835
(1 row)
836836

837837
--should return listen
838838
SELECT dblink_exec('LISTEN regression');
839-
dblink_exec
839+
dblink_exec
840840
-------------
841841
LISTEN
842842
(1 row)
843843

844844
--should return listen
845845
SELECT dblink_exec('LISTEN foobar');
846-
dblink_exec
846+
dblink_exec
847847
-------------
848848
LISTEN
849849
(1 row)
850850

851851
SELECT dblink_exec('NOTIFY regression');
852-
dblink_exec
852+
dblink_exec
853853
-------------
854854
NOTIFY
855855
(1 row)
856856

857857
SELECT dblink_exec('NOTIFY foobar');
858-
dblink_exec
858+
dblink_exec
859859
-------------
860860
NOTIFY
861861
(1 row)
862862

863863
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();
864-
notify_name | is_self_notify | extra
864+
notify_name | is_self_notify | extra
865865
-------------+----------------+-------
866-
regression | t |
867-
foobar | t |
866+
regression | t |
867+
foobar | t |
868868
(2 rows)
869869

870870
SELECT * from dblink_get_notify();
871-
notify_name | be_pid | extra
871+
notify_name | be_pid | extra
872872
-------------+--------+-------
873873
(0 rows)
874874

875875
SELECT dblink_disconnect();
876-
dblink_disconnect
876+
dblink_disconnect
877877
-------------------
878878
OK
879879
(1 row)

contrib/pgcrypto/expected/crypt-blowfish.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CREATE TABLE ctest (data text, res text, salt text);
1717
INSERT INTO ctest VALUES ('password', '', '');
1818
UPDATE ctest SET salt = gen_salt('bf', 8);
1919
UPDATE ctest SET res = crypt(data, salt);
20-
SELECT res = crypt(data, res) AS "worked"
20+
SELECT res = crypt(data, res) AS "worked"
2121
FROM ctest;
2222
worked
2323
--------

contrib/pgcrypto/expected/pgp-armor.out

+15-15
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ SET bytea_output TO escape;
66
select armor('');
77
armor
88
-----------------------------
9-
-----BEGIN PGP MESSAGE-----
10-
11-
=twTO
12-
-----END PGP MESSAGE-----
9+
-----BEGIN PGP MESSAGE-----+
10+
+
11+
=twTO +
12+
-----END PGP MESSAGE----- +
1313

1414
(1 row)
1515

1616
select armor('test');
1717
armor
1818
-----------------------------
19-
-----BEGIN PGP MESSAGE-----
20-
21-
dGVzdA==
22-
=+G7Q
23-
-----END PGP MESSAGE-----
19+
-----BEGIN PGP MESSAGE-----+
20+
+
21+
dGVzdA== +
22+
=+G7Q +
23+
-----END PGP MESSAGE----- +
2424

2525
(1 row)
2626

@@ -40,12 +40,12 @@ select armor('0123456789abcdef0123456789abcdef0123456789abcdef
4040
0123456789abcdef0123456789abcdef0123456789abcdef');
4141
armor
4242
------------------------------------------------------------------------------
43-
-----BEGIN PGP MESSAGE-----
44-
45-
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3
46-
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
47-
=JFw5
48-
-----END PGP MESSAGE-----
43+
-----BEGIN PGP MESSAGE----- +
44+
+
45+
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3+
46+
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg== +
47+
=JFw5 +
48+
-----END PGP MESSAGE----- +
4949

5050
(1 row)
5151

contrib/pgcrypto/expected/pgp-decrypt.out

+20-20
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ yA6Ce1QTMK3KdL2MPfamsTUSAML8huCJMwYQFfE=
1111
=JcP+
1212
-----END PGP MESSAGE-----
1313
'), 'foobar');
14-
pgp_sym_decrypt
14+
pgp_sym_decrypt
1515
-----------------
1616
Secret message.
1717
(1 row)
@@ -25,7 +25,7 @@ UTAsG35A1vYs02VARKzGz6xI2UHwFUirP+brPBg3Ee7muOx8pA==
2525
=XtrP
2626
-----END PGP MESSAGE-----
2727
'), 'foobar');
28-
pgp_sym_decrypt
28+
pgp_sym_decrypt
2929
-----------------
3030
Secret message.
3131
(1 row)
@@ -39,7 +39,7 @@ jA0ECAMCI7YQpWqp3D1g0kQBCjB7GlX7+SQeXNleXeXQ78ZAPNliquGDq9u378zI
3939
=rCZt
4040
-----END PGP MESSAGE-----
4141
'), 'foobar');
42-
pgp_sym_decrypt
42+
pgp_sym_decrypt
4343
-----------------
4444
Secret message.
4545
(1 row)
@@ -53,7 +53,7 @@ lceMfQdbAg6oTFyJpk/wH18GzRDphCofg0X8uLgkAKMrpcmgog==
5353
=fB6S
5454
-----END PGP MESSAGE-----
5555
'), 'foobar');
56-
pgp_sym_decrypt
56+
pgp_sym_decrypt
5757
-----------------
5858
Secret message.
5959
(1 row)
@@ -68,7 +68,7 @@ u9YkgfJfsuRJmgQ9tmo=
6868
=60ui
6969
-----END PGP MESSAGE-----
7070
'), 'foobar');
71-
pgp_sym_decrypt
71+
pgp_sym_decrypt
7272
-----------------
7373
Secret message.
7474
(1 row)
@@ -82,7 +82,7 @@ jA0EBwMCEeP3idNjQ1Bg0kQBf4G0wX+2QNzLh2YNwYkQgQkfYhn/hLXjV4nK9nsE
8282
=moGf
8383
-----END PGP MESSAGE-----
8484
'), 'foobar');
85-
pgp_sym_decrypt
85+
pgp_sym_decrypt
8686
-----------------
8787
Secret message.
8888
(1 row)
@@ -97,7 +97,7 @@ KyRrHf7zEBuZiZ2AG34jNVMOLToj1jJUg5zTSdecUzQVCykWTA==
9797
=NyLk
9898
-----END PGP MESSAGE-----
9999
'), 'foobar');
100-
pgp_sym_decrypt
100+
pgp_sym_decrypt
101101
-----------------
102102
Secret message.
103103
(1 row)
@@ -111,7 +111,7 @@ jA0EBwMCApbdlrURoWJg0kQBzHM/E0o7djY82bNuspjxjAcPFrrtp0uvDdMQ4z2m
111111
=FxbQ
112112
-----END PGP MESSAGE-----
113113
'), 'foobar');
114-
pgp_sym_decrypt
114+
pgp_sym_decrypt
115115
-----------------
116116
Secret message.
117117
(1 row)
@@ -126,7 +126,7 @@ Ah9GXjGS1TVALzTImJbz1uHUZRfhJlFbc5yGQw==
126126
=YvkV
127127
-----END PGP MESSAGE-----
128128
'), 'foobar');
129-
pgp_sym_decrypt
129+
pgp_sym_decrypt
130130
-----------------
131131
Secret message.
132132
(1 row)
@@ -140,7 +140,7 @@ jAwEBwEC/QTByBLI3b/SRAHPxKzI6SZBo5lAEOD+EsvKQWO4adL9tDY+++Iqy1xK
140140
=dbXm
141141
-----END PGP MESSAGE-----
142142
'), 'foobar');
143-
pgp_sym_decrypt
143+
pgp_sym_decrypt
144144
-----------------
145145
Secret message.
146146
(1 row)
@@ -154,7 +154,7 @@ z+9ZaA/XdSx5ZiFnMym8P6r8uY9rLjjNptvvRHlxIReF+p9MNg==
154154
=VJKg
155155
-----END PGP MESSAGE-----
156156
'), 'foobar');
157-
pgp_sym_decrypt
157+
pgp_sym_decrypt
158158
-----------------
159159
Secret message.
160160
(1 row)
@@ -168,7 +168,7 @@ Cr3i2M7TgVZ0M4jp4QL0adG1lpN5iK7aQeOwMw==
168168
=cg+i
169169
-----END PGP MESSAGE-----
170170
'), 'foobar');
171-
pgp_sym_decrypt
171+
pgp_sym_decrypt
172172
-----------------
173173
Secret message.
174174
(1 row)
@@ -182,7 +182,7 @@ jAwECAECruOfyNDFiTnSRAEVoGXm4A9UZKkWljdzjEO/iaE7mIraltIpQMkiqCh9
182182
=aHmC
183183
-----END PGP MESSAGE-----
184184
'), 'foobar');
185-
pgp_sym_decrypt
185+
pgp_sym_decrypt
186186
-----------------
187187
Secret message.
188188
(1 row)
@@ -196,7 +196,7 @@ q6eF6859ZVnli3BFSDSk3a4e/pXhglxmDYCfjAXkozKNYLo6yw==
196196
=K0LS
197197
-----END PGP MESSAGE-----
198198
'), 'foobar');
199-
pgp_sym_decrypt
199+
pgp_sym_decrypt
200200
-----------------
201201
Secret message.
202202
(1 row)
@@ -210,7 +210,7 @@ rQr3WbdKdY9ufjOE5+mXI+EFkSPrF9rL9NCq6w==
210210
=RGts
211211
-----END PGP MESSAGE-----
212212
'), 'foobar');
213-
pgp_sym_decrypt
213+
pgp_sym_decrypt
214214
-----------------
215215
Secret message.
216216
(1 row)
@@ -224,7 +224,7 @@ jAwECQECKHhrou7ZOIXSRAHWIVP+xjVQcjAVBTt+qh9SNzYe248xFTwozkwev3mO
224224
=SUrU
225225
-----END PGP MESSAGE-----
226226
'), 'foobar');
227-
pgp_sym_decrypt
227+
pgp_sym_decrypt
228228
-----------------
229229
Secret message.
230230
(1 row)
@@ -238,7 +238,7 @@ jA0ECQMCjc8lwZu8Fz1g0kQBkEzjImi21liep5jj+3dAJ2aZFfUkohi8b3n9z+7+
238238
=XZrG
239239
-----END PGP MESSAGE-----
240240
'), 'foobar');
241-
pgp_sym_decrypt
241+
pgp_sym_decrypt
242242
-----------------
243243
Secret message.
244244
(1 row)
@@ -253,7 +253,7 @@ tTGup1mMz6Cfh1uDRErUuXpx9A0gdMu7zX0o5XjrL7WGDAZdSw==
253253
=XKKG
254254
-----END PGP MESSAGE-----
255255
'), '0123456789abcdefghij');
256-
pgp_sym_decrypt
256+
pgp_sym_decrypt
257257
-----------------
258258
Secret message.
259259
(1 row)
@@ -267,7 +267,7 @@ CMxFKadf144H/vpoV9GA0f22keQgCl0EsTE4V4lweVOPTKCMJg==
267267
=gWDh
268268
-----END PGP MESSAGE-----
269269
'), '0123456789abcdefghij2jk4h5g2j54khg23h54g2kh54g2khj54g23hj54');
270-
pgp_sym_decrypt
270+
pgp_sym_decrypt
271271
-----------------
272272
Secret message.
273273
(1 row)
@@ -281,7 +281,7 @@ FwsDabdQUz5O7bgNSnxfmyw1OifGF+W2bIn/8W+0rDf8u3+O+Q==
281281
=OxOF
282282
-----END PGP MESSAGE-----
283283
'), 'x');
284-
pgp_sym_decrypt
284+
pgp_sym_decrypt
285285
-----------------
286286
Secret message.
287287
(1 row)

contrib/tsearch2/expected/tsearch2.out

+21-21
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,8 @@ select * from parse('default', '345 qwe@efd.r '' http://www.com/ http://aew.werc
742742
3 | ewri2
743743
12 |
744744
13 | <a href="qwe<qwe>">
745-
12 |
746-
:
745+
12 | +
746+
|
747747
19 | /usr/local/fff
748748
12 |
749749
19 | /awdf/dwqe/4325
@@ -775,8 +775,8 @@ select * from parse('default', '345 qwe@efd.r '' http://www.com/ http://aew.werc
775775
20 | -4.2
776776
12 | .
777777
22 | 234
778-
12 |
779-
:
778+
12 | +
779+
|
780780
12 | <
781781
1 | i
782782
12 |
@@ -2330,8 +2330,8 @@ Upon a woman s face. E. J. Pratt (1882 1964)
23302330
', to_tsquery('sea&thousand&years'));
23312331
headline
23322332
--------------------------------------------
2333-
<b>sea</b> a <b>thousand</b> <b>years</b>,
2334-
A <b>thousand</b> <b>years</b> to trace
2333+
<b>sea</b> a <b>thousand</b> <b>years</b>,+
2334+
A <b>thousand</b> <b>years</b> to trace +
23352335
The granite features of this cliff
23362336
(1 row)
23372337

@@ -2347,8 +2347,8 @@ Upon a woman s face. E. J. Pratt (1882 1964)
23472347
', to_tsquery('granite&sea'));
23482348
headline
23492349
-------------------------------------------
2350-
<b>sea</b> a thousand years,
2351-
A thousand years to trace
2350+
<b>sea</b> a thousand years, +
2351+
A thousand years to trace +
23522352
The <b>granite</b> features of this cliff
23532353
(1 row)
23542354

@@ -2364,8 +2364,8 @@ Upon a woman s face. E. J. Pratt (1882 1964)
23642364
', to_tsquery('sea'));
23652365
headline
23662366
------------------------------------
2367-
<b>sea</b> a thousand years,
2368-
A thousand years to trace
2367+
<b>sea</b> a thousand years, +
2368+
A thousand years to trace +
23692369
The granite features of this cliff
23702370
(1 row)
23712371

@@ -2384,17 +2384,17 @@ ff-bg
23842384
to_tsquery('sea&foo'), 'HighlightAll=true');
23852385
headline
23862386
-----------------------------------------------------------------------------
2387-
2388-
<html>
2389-
<!-- some comment -->
2390-
<body>
2391-
<b>Sea</b> view wow <u><b>foo</b> bar</u> <i>qq</i>
2392-
<a href="http://www.google.com/foo.bar.html" target="_blank">YES &nbsp;</a>
2393-
ff-bg
2394-
<script>
2395-
document.write(15);
2396-
</script>
2397-
</body>
2387+
+
2388+
<html> +
2389+
<!-- some comment --> +
2390+
<body> +
2391+
<b>Sea</b> view wow <u><b>foo</b> bar</u> <i>qq</i> +
2392+
<a href="http://www.google.com/foo.bar.html" target="_blank">YES &nbsp;</a>+
2393+
ff-bg +
2394+
<script> +
2395+
document.write(15); +
2396+
</script> +
2397+
</body> +
23982398
</html>
23992399
(1 row)
24002400

0 commit comments

Comments
 (0)