mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -17,7 +17,7 @@ CREATE TABLE ctest (data text, res text, salt text);
|
||||
INSERT INTO ctest VALUES ('password', '', '');
|
||||
UPDATE ctest SET salt = gen_salt('bf', 8);
|
||||
UPDATE ctest SET res = crypt(data, salt);
|
||||
SELECT res = crypt(data, res) AS "worked"
|
||||
SELECT res = crypt(data, res) AS "worked"
|
||||
FROM ctest;
|
||||
worked
|
||||
--------
|
||||
|
@ -6,21 +6,21 @@ SET bytea_output TO escape;
|
||||
select armor('');
|
||||
armor
|
||||
-----------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
=twTO
|
||||
-----END PGP MESSAGE-----
|
||||
-----BEGIN PGP MESSAGE-----+
|
||||
+
|
||||
=twTO +
|
||||
-----END PGP MESSAGE----- +
|
||||
|
||||
(1 row)
|
||||
|
||||
select armor('test');
|
||||
armor
|
||||
-----------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
dGVzdA==
|
||||
=+G7Q
|
||||
-----END PGP MESSAGE-----
|
||||
-----BEGIN PGP MESSAGE-----+
|
||||
+
|
||||
dGVzdA== +
|
||||
=+G7Q +
|
||||
-----END PGP MESSAGE----- +
|
||||
|
||||
(1 row)
|
||||
|
||||
@ -40,12 +40,12 @@ select armor('0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
0123456789abcdef0123456789abcdef0123456789abcdef');
|
||||
armor
|
||||
------------------------------------------------------------------------------
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3
|
||||
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
|
||||
=JFw5
|
||||
-----END PGP MESSAGE-----
|
||||
-----BEGIN PGP MESSAGE----- +
|
||||
+
|
||||
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3+
|
||||
ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg== +
|
||||
=JFw5 +
|
||||
-----END PGP MESSAGE----- +
|
||||
|
||||
(1 row)
|
||||
|
||||
|
@ -11,7 +11,7 @@ yA6Ce1QTMK3KdL2MPfamsTUSAML8huCJMwYQFfE=
|
||||
=JcP+
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -25,7 +25,7 @@ UTAsG35A1vYs02VARKzGz6xI2UHwFUirP+brPBg3Ee7muOx8pA==
|
||||
=XtrP
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -39,7 +39,7 @@ jA0ECAMCI7YQpWqp3D1g0kQBCjB7GlX7+SQeXNleXeXQ78ZAPNliquGDq9u378zI
|
||||
=rCZt
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -53,7 +53,7 @@ lceMfQdbAg6oTFyJpk/wH18GzRDphCofg0X8uLgkAKMrpcmgog==
|
||||
=fB6S
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -68,7 +68,7 @@ u9YkgfJfsuRJmgQ9tmo=
|
||||
=60ui
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -82,7 +82,7 @@ jA0EBwMCEeP3idNjQ1Bg0kQBf4G0wX+2QNzLh2YNwYkQgQkfYhn/hLXjV4nK9nsE
|
||||
=moGf
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -97,7 +97,7 @@ KyRrHf7zEBuZiZ2AG34jNVMOLToj1jJUg5zTSdecUzQVCykWTA==
|
||||
=NyLk
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -111,7 +111,7 @@ jA0EBwMCApbdlrURoWJg0kQBzHM/E0o7djY82bNuspjxjAcPFrrtp0uvDdMQ4z2m
|
||||
=FxbQ
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -126,7 +126,7 @@ Ah9GXjGS1TVALzTImJbz1uHUZRfhJlFbc5yGQw==
|
||||
=YvkV
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -140,7 +140,7 @@ jAwEBwEC/QTByBLI3b/SRAHPxKzI6SZBo5lAEOD+EsvKQWO4adL9tDY+++Iqy1xK
|
||||
=dbXm
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -154,7 +154,7 @@ z+9ZaA/XdSx5ZiFnMym8P6r8uY9rLjjNptvvRHlxIReF+p9MNg==
|
||||
=VJKg
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -168,7 +168,7 @@ Cr3i2M7TgVZ0M4jp4QL0adG1lpN5iK7aQeOwMw==
|
||||
=cg+i
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -182,7 +182,7 @@ jAwECAECruOfyNDFiTnSRAEVoGXm4A9UZKkWljdzjEO/iaE7mIraltIpQMkiqCh9
|
||||
=aHmC
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -196,7 +196,7 @@ q6eF6859ZVnli3BFSDSk3a4e/pXhglxmDYCfjAXkozKNYLo6yw==
|
||||
=K0LS
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -210,7 +210,7 @@ rQr3WbdKdY9ufjOE5+mXI+EFkSPrF9rL9NCq6w==
|
||||
=RGts
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -224,7 +224,7 @@ jAwECQECKHhrou7ZOIXSRAHWIVP+xjVQcjAVBTt+qh9SNzYe248xFTwozkwev3mO
|
||||
=SUrU
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -238,7 +238,7 @@ jA0ECQMCjc8lwZu8Fz1g0kQBkEzjImi21liep5jj+3dAJ2aZFfUkohi8b3n9z+7+
|
||||
=XZrG
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'foobar');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -253,7 +253,7 @@ tTGup1mMz6Cfh1uDRErUuXpx9A0gdMu7zX0o5XjrL7WGDAZdSw==
|
||||
=XKKG
|
||||
-----END PGP MESSAGE-----
|
||||
'), '0123456789abcdefghij');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -267,7 +267,7 @@ CMxFKadf144H/vpoV9GA0f22keQgCl0EsTE4V4lweVOPTKCMJg==
|
||||
=gWDh
|
||||
-----END PGP MESSAGE-----
|
||||
'), '0123456789abcdefghij2jk4h5g2j54khg23h54g2kh54g2khj54g23hj54');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
@ -281,7 +281,7 @@ FwsDabdQUz5O7bgNSnxfmyw1OifGF+W2bIn/8W+0rDf8u3+O+Q==
|
||||
=OxOF
|
||||
-----END PGP MESSAGE-----
|
||||
'), 'x');
|
||||
pgp_sym_decrypt
|
||||
pgp_sym_decrypt
|
||||
-----------------
|
||||
Secret message.
|
||||
(1 row)
|
||||
|
Reference in New Issue
Block a user