2 -- Tests for psql features that aren't closely connected to any
3 -- specific server features
8 invalid variable name: "invalid/name"
9 -- fail: invalid value for special variable
11 unrecognized value "foo" for "AUTOCOMMIT": boolean expected
13 invalid value "foo" for "FETCH_COUNT": integer expected
14 -- check handling of built-in boolean variable
15 \echo :ON_ERROR_ROLLBACK
17 \set ON_ERROR_ROLLBACK
18 \echo :ON_ERROR_ROLLBACK
20 \set ON_ERROR_ROLLBACK foo
21 unrecognized value "foo" for "ON_ERROR_ROLLBACK"
22 Available values are: on, off, interactive.
23 \echo :ON_ERROR_ROLLBACK
25 \set ON_ERROR_ROLLBACK on
26 \echo :ON_ERROR_ROLLBACK
28 \unset ON_ERROR_ROLLBACK
29 \echo :ON_ERROR_ROLLBACK
32 SELECT 1 as one, 2 as two \g
43 SELECT 3 as three, 4 as four \gx
55 select 10 as test01, 20 as test02, 'Hello' as test03 \gset pref01_
56 \echo :pref01_test01 :pref01_test02 :pref01_test03
58 -- should fail: bad variable name
59 select 10 as "bad name"
61 invalid variable name: "bad name"
62 -- multiple backslash commands in one line
63 select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
65 select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
68 select 5 as x, 6 as y \gset pref01_ \\ \g \echo :pref01_x :pref01_y
75 select 7 as x, 8 as y \g \gset pref01_ \echo :pref01_x :pref01_y
82 -- NULL should unset the variable
84 select 1 as var1, NULL as var2, 3 as var3 \gset
85 \echo :var1 :var2 :var3
87 -- \gset requires just one tuple
88 select 10 as test01, 20 as test02 from generate_series(1,3) \gset
89 more than one row returned for \gset
90 select 10 as test01, 20 as test02 from generate_series(1,0) \gset
91 no rows returned for \gset
92 -- \gset should work in FETCH_COUNT mode too
94 select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
96 select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
99 select 10 as test01, 20 as test02 from generate_series(1,3) \gset
100 more than one row returned for \gset
101 select 10 as test01, 20 as test02 from generate_series(1,0) \gset
102 no rows returned for \gset
105 create temporary table gexec_test(a int, b text, c date, d float);
106 select format('create index on gexec_test(%I)', attname)
108 where attrelid = 'gexec_test'::regclass and attnum > 0
111 create index on gexec_test(a)
112 create index on gexec_test(b)
113 create index on gexec_test(c)
114 create index on gexec_test(d)
115 -- \gexec should work in FETCH_COUNT mode too
116 -- (though the fetch limit applies to the executed queries not the meta query)
118 select 'select 1 as ones', 'select x.y, x.y*2 as double from generate_series(1,4) as x(y)'
120 select 'drop table gexec_test', NULL
122 select 'drop table gexec_test', 'select ''2000-01-01''::date as party_over'
130 select x.y, x.y*2 as double from generate_series(1,4) as x(y)
139 drop table gexec_test
140 drop table gexec_test
141 ERROR: table "gexec_test" does not exist
142 select '2000-01-01'::date as party_over
149 -- show all pset options
168 unicode_border_linestyle single
169 unicode_column_linestyle single
170 unicode_header_linestyle single
171 -- test multi-line headers, wrapping, and newline indicators
172 prepare q as select array_to_string(array_agg(repeat('x',2*n)),E'\n') as "ab
174 c", array_to_string(array_agg(repeat('y',20-2*n)),E'\n') as "a
175 bc" from generate_series(1,10) as n(n) group by n>1 order by n>1;
176 \pset linestyle ascii
180 \pset format unaligned
186 xx|yyyyyyyyyyyyyyyyyy
195 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
210 -------------------- ------------------
211 xx yyyyyyyyyyyyyyyyyy
212 xxxx +yyyyyyyyyyyyyyyy +
213 xxxxxx +yyyyyyyyyyyyyy +
214 xxxxxxxx +yyyyyyyyyyyy +
215 xxxxxxxxxx +yyyyyyyyyy +
216 xxxxxxxxxxxx +yyyyyyyy +
217 xxxxxxxxxxxxxx +yyyyyy +
218 xxxxxxxxxxxxxxxx +yyyy +
219 xxxxxxxxxxxxxxxxxx +yy +
228 -------------------- ------------------
229 xx yyyyyyyyyyyyyyyyyy
230 xxxx +yyyyyyyyyyyyyyyy +
231 xxxxxx +yyyyyyyyyyyyyy +
232 xxxxxxxx +yyyyyyyyyyyy +
233 xxxxxxxxxx +yyyyyyyyyy +
234 xxxxxxxxxxxx +yyyyyyyy +
235 xxxxxxxxxxxxxx +yyyyyy +
236 xxxxxxxxxxxxxxxx +yyyy +
237 xxxxxxxxxxxxxxxxxx +yy +
242 \pset format unaligned
248 xx|yyyyyyyyyyyyyyyyyy
257 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
272 ----------------------+--------------------
273 xx | yyyyyyyyyyyyyyyyyy
274 xxxx +| yyyyyyyyyyyyyyyy +
275 xxxxxx +| yyyyyyyyyyyyyy +
276 xxxxxxxx +| yyyyyyyyyyyy +
277 xxxxxxxxxx +| yyyyyyyyyy +
278 xxxxxxxxxxxx +| yyyyyyyy +
279 xxxxxxxxxxxxxx +| yyyyyy +
280 xxxxxxxxxxxxxxxx +| yyyy +
281 xxxxxxxxxxxxxxxxxx +| yy +
282 xxxxxxxxxxxxxxxxxxxx |
290 -------------------+--------------------
291 xx | yyyyyyyyyyyyyyyyyy
292 xxxx +| yyyyyyyyyyyyyyyy +
293 xxxxxx +| yyyyyyyyyyyyyy +
294 xxxxxxxx +| yyyyyyyyyyyy +
295 xxxxxxxxxx +| yyyyyyyyyy +
296 xxxxxxxxxxxx +| yyyyyyyy +
297 xxxxxxxxxxxxxx +| yyyyyy +
298 xxxxxxxxxxxxxxxx +| yyyy +
299 xxxxxxxxxxxxxxxxx.| yy +
306 \pset format unaligned
312 xx|yyyyyyyyyyyyyyyyyy
321 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
333 +----------------------+--------------------+
337 +----------------------+--------------------+
338 | xx | yyyyyyyyyyyyyyyyyy |
339 | xxxx +| yyyyyyyyyyyyyyyy +|
340 | xxxxxx +| yyyyyyyyyyyyyy +|
341 | xxxxxxxx +| yyyyyyyyyyyy +|
342 | xxxxxxxxxx +| yyyyyyyyyy +|
343 | xxxxxxxxxxxx +| yyyyyyyy +|
344 | xxxxxxxxxxxxxx +| yyyyyy +|
345 | xxxxxxxxxxxxxxxx +| yyyy +|
346 | xxxxxxxxxxxxxxxxxx +| yy +|
347 | xxxxxxxxxxxxxxxxxxxx | |
348 +----------------------+--------------------+
353 +-----------------+--------------------+
357 +-----------------+--------------------+
358 | xx | yyyyyyyyyyyyyyyyyy |
359 | xxxx +| yyyyyyyyyyyyyyyy +|
360 | xxxxxx +| yyyyyyyyyyyyyy +|
361 | xxxxxxxx +| yyyyyyyyyyyy +|
362 | xxxxxxxxxx +| yyyyyyyyyy +|
363 | xxxxxxxxxxxx +| yyyyyyyy +|
364 | xxxxxxxxxxxxxx +| yyyyyy +|
365 | xxxxxxxxxxxxxxx.| yyyy +|
367 | xxxxxxxxxxxxxxx.| |
369 | xxxxxxxxxxxxxxx.| |
371 +-----------------+--------------------+
377 \pset format unaligned
383 bc|yyyyyyyyyyyyyyyyyy
412 a + yyyyyyyyyyyyyyyyyy
424 a + yyyyyyyyyyyyyyyy +
467 \pset format unaligned
473 bc|yyyyyyyyyyyyyyyyyy
498 -[ RECORD 1 ]------------
502 a +| yyyyyyyyyyyyyyyyyy
504 -[ RECORD 2 ]------------
512 | xxxxxxxxxxxxxxxxxx +
513 | xxxxxxxxxxxxxxxxxxxx
514 a +| yyyyyyyyyyyyyyyy +
515 bc | yyyyyyyyyyyyyy +
557 \pset format unaligned
563 bc|yyyyyyyyyyyyyyyyyy
588 +-[ RECORD 1 ]--------------+
592 | a +| yyyyyyyyyyyyyyyyyy |
594 +-[ RECORD 2 ]--------------+
600 | | xxxxxxxxxxxxxx +|
601 | | xxxxxxxxxxxxxxxx +|
602 | | xxxxxxxxxxxxxxxxxx +|
603 | | xxxxxxxxxxxxxxxxxxxx |
604 | a +| yyyyyyyyyyyyyyyy +|
605 | bc | yyyyyyyyyyyyyy +|
613 +----+----------------------+
652 \pset linestyle old-ascii
656 \pset format unaligned
662 xx|yyyyyyyyyyyyyyyyyy
671 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
686 -------------------- ------------------
687 xx yyyyyyyyyyyyyyyyyy
688 xxxx yyyyyyyyyyyyyyyy
689 xxxxxx yyyyyyyyyyyyyy
690 xxxxxxxx yyyyyyyyyyyy
691 xxxxxxxxxx yyyyyyyyyy
692 xxxxxxxxxxxx yyyyyyyy
693 xxxxxxxxxxxxxx yyyyyy
694 xxxxxxxxxxxxxxxx yyyy
695 xxxxxxxxxxxxxxxxxx yy
704 -------------------- ------------------
705 xx yyyyyyyyyyyyyyyyyy
706 xxxx yyyyyyyyyyyyyyyy
707 xxxxxx yyyyyyyyyyyyyy
708 xxxxxxxx yyyyyyyyyyyy
709 xxxxxxxxxx yyyyyyyyyy
710 xxxxxxxxxxxx yyyyyyyy
711 xxxxxxxxxxxxxx yyyyyy
712 xxxxxxxxxxxxxxxx yyyy
713 xxxxxxxxxxxxxxxxxx yy
718 \pset format unaligned
724 xx|yyyyyyyyyyyyyyyyyy
733 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
748 ----------------------+--------------------
749 xx | yyyyyyyyyyyyyyyyyy
750 xxxx | yyyyyyyyyyyyyyyy
751 xxxxxx : yyyyyyyyyyyyyy
752 xxxxxxxx : yyyyyyyyyyyy
753 xxxxxxxxxx : yyyyyyyyyy
754 xxxxxxxxxxxx : yyyyyyyy
755 xxxxxxxxxxxxxx : yyyyyy
756 xxxxxxxxxxxxxxxx : yyyy
757 xxxxxxxxxxxxxxxxxx : yy
758 xxxxxxxxxxxxxxxxxxxx :
766 -------------------+--------------------
767 xx | yyyyyyyyyyyyyyyyyy
768 xxxx | yyyyyyyyyyyyyyyy
769 xxxxxx : yyyyyyyyyyyyyy
770 xxxxxxxx : yyyyyyyyyyyy
771 xxxxxxxxxx : yyyyyyyyyy
772 xxxxxxxxxxxx : yyyyyyyy
773 xxxxxxxxxxxxxx : yyyyyy
774 xxxxxxxxxxxxxxxx : yyyy
775 xxxxxxxxxxxxxxxxx : yy
782 \pset format unaligned
788 xx|yyyyyyyyyyyyyyyyyy
797 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
809 +----------------------+--------------------+
813 +----------------------+--------------------+
814 | xx | yyyyyyyyyyyyyyyyyy |
815 | xxxx | yyyyyyyyyyyyyyyy |
816 | xxxxxx : yyyyyyyyyyyyyy |
817 | xxxxxxxx : yyyyyyyyyyyy |
818 | xxxxxxxxxx : yyyyyyyyyy |
819 | xxxxxxxxxxxx : yyyyyyyy |
820 | xxxxxxxxxxxxxx : yyyyyy |
821 | xxxxxxxxxxxxxxxx : yyyy |
822 | xxxxxxxxxxxxxxxxxx : yy |
823 | xxxxxxxxxxxxxxxxxxxx : |
824 +----------------------+--------------------+
829 +-----------------+--------------------+
833 +-----------------+--------------------+
834 | xx | yyyyyyyyyyyyyyyyyy |
835 | xxxx | yyyyyyyyyyyyyyyy |
836 | xxxxxx : yyyyyyyyyyyyyy |
837 | xxxxxxxx : yyyyyyyyyyyy |
838 | xxxxxxxxxx : yyyyyyyyyy |
839 | xxxxxxxxxxxx : yyyyyyyy |
840 | xxxxxxxxxxxxxx : yyyyyy |
841 | xxxxxxxxxxxxxxx : yyyy |
843 | xxxxxxxxxxxxxxx : |
847 +-----------------+--------------------+
853 \pset format unaligned
859 bc|yyyyyyyyyyyyyyyyyy
941 \pset format unaligned
947 bc|yyyyyyyyyyyyyyyyyy
972 -[ RECORD 1 ]-------------
976 a | yyyyyyyyyyyyyyyyyy
978 -[ RECORD 2 ]-------------
987 : xxxxxxxxxxxxxxxxxxxx
1000 -[ RECORD 1 ]-------
1006 -[ RECORD 2 ]-------
1031 \pset format unaligned
1037 bc|yyyyyyyyyyyyyyyyyy
1049 xxxxxxxxxxxxxxxxxxxx
1060 \pset format aligned
1062 +-[ RECORD 1 ]--------------+
1066 | a | yyyyyyyyyyyyyyyyyy |
1068 +-[ RECORD 2 ]--------------+
1074 | : xxxxxxxxxxxxxx |
1075 | : xxxxxxxxxxxxxxxx |
1076 | : xxxxxxxxxxxxxxxxxx |
1077 | : xxxxxxxxxxxxxxxxxxxx |
1078 | a | yyyyyyyyyyyyyyyy |
1079 |+bc : yyyyyyyyyyyyyy |
1087 +----+----------------------+
1089 \pset format wrapped
1091 +-[ RECORD 1 ]-----+
1097 +-[ RECORD 2 ]-----+
1124 +----+-------------+
1127 -- test single-line header and data
1128 prepare q as select repeat('x',2*n) as "0123456789abcdef", repeat('y',20-2*n) as "0123456789" from generate_series(1,10) as n;
1129 \pset linestyle ascii
1133 \pset format unaligned
1135 0123456789abcdef|0123456789
1136 xx|yyyyyyyyyyyyyyyyyy
1137 xxxx|yyyyyyyyyyyyyyyy
1138 xxxxxx|yyyyyyyyyyyyyy
1139 xxxxxxxx|yyyyyyyyyyyy
1140 xxxxxxxxxx|yyyyyyyyyy
1141 xxxxxxxxxxxx|yyyyyyyy
1142 xxxxxxxxxxxxxx|yyyyyy
1143 xxxxxxxxxxxxxxxx|yyyy
1144 xxxxxxxxxxxxxxxxxx|yy
1145 xxxxxxxxxxxxxxxxxxxx|
1147 \pset format aligned
1149 0123456789abcdef 0123456789
1150 -------------------- ------------------
1151 xx yyyyyyyyyyyyyyyyyy
1152 xxxx yyyyyyyyyyyyyyyy
1153 xxxxxx yyyyyyyyyyyyyy
1154 xxxxxxxx yyyyyyyyyyyy
1155 xxxxxxxxxx yyyyyyyyyy
1156 xxxxxxxxxxxx yyyyyyyy
1157 xxxxxxxxxxxxxx yyyyyy
1158 xxxxxxxxxxxxxxxx yyyy
1159 xxxxxxxxxxxxxxxxxx yy
1160 xxxxxxxxxxxxxxxxxxxx
1163 \pset format wrapped
1165 0123456789abcdef 0123456789
1166 -------------------- ------------------
1167 xx yyyyyyyyyyyyyyyyyy
1168 xxxx yyyyyyyyyyyyyyyy
1169 xxxxxx yyyyyyyyyyyyyy
1170 xxxxxxxx yyyyyyyyyyyy
1171 xxxxxxxxxx yyyyyyyyyy
1172 xxxxxxxxxxxx yyyyyyyy
1173 xxxxxxxxxxxxxx yyyyyy
1174 xxxxxxxxxxxxxxxx yyyy
1175 xxxxxxxxxxxxxxxxxx yy
1176 xxxxxxxxxxxxxxxxxxxx
1180 \pset format unaligned
1182 0123456789abcdef|0123456789
1183 xx|yyyyyyyyyyyyyyyyyy
1184 xxxx|yyyyyyyyyyyyyyyy
1185 xxxxxx|yyyyyyyyyyyyyy
1186 xxxxxxxx|yyyyyyyyyyyy
1187 xxxxxxxxxx|yyyyyyyyyy
1188 xxxxxxxxxxxx|yyyyyyyy
1189 xxxxxxxxxxxxxx|yyyyyy
1190 xxxxxxxxxxxxxxxx|yyyy
1191 xxxxxxxxxxxxxxxxxx|yy
1192 xxxxxxxxxxxxxxxxxxxx|
1194 \pset format aligned
1196 0123456789abcdef | 0123456789
1197 ----------------------+--------------------
1198 xx | yyyyyyyyyyyyyyyyyy
1199 xxxx | yyyyyyyyyyyyyyyy
1200 xxxxxx | yyyyyyyyyyyyyy
1201 xxxxxxxx | yyyyyyyyyyyy
1202 xxxxxxxxxx | yyyyyyyyyy
1203 xxxxxxxxxxxx | yyyyyyyy
1204 xxxxxxxxxxxxxx | yyyyyy
1205 xxxxxxxxxxxxxxxx | yyyy
1206 xxxxxxxxxxxxxxxxxx | yy
1207 xxxxxxxxxxxxxxxxxxxx |
1210 \pset format wrapped
1212 0123456789abcdef | 0123456789
1213 ---------------------+------------------
1214 xx | yyyyyyyyyyyyyyyy.
1216 xxxx | yyyyyyyyyyyyyyyy
1217 xxxxxx | yyyyyyyyyyyyyy
1218 xxxxxxxx | yyyyyyyyyyyy
1219 xxxxxxxxxx | yyyyyyyyyy
1220 xxxxxxxxxxxx | yyyyyyyy
1221 xxxxxxxxxxxxxx | yyyyyy
1222 xxxxxxxxxxxxxxxx | yyyy
1223 xxxxxxxxxxxxxxxxxx | yy
1224 xxxxxxxxxxxxxxxxxxx.|
1229 \pset format unaligned
1231 0123456789abcdef|0123456789
1232 xx|yyyyyyyyyyyyyyyyyy
1233 xxxx|yyyyyyyyyyyyyyyy
1234 xxxxxx|yyyyyyyyyyyyyy
1235 xxxxxxxx|yyyyyyyyyyyy
1236 xxxxxxxxxx|yyyyyyyyyy
1237 xxxxxxxxxxxx|yyyyyyyy
1238 xxxxxxxxxxxxxx|yyyyyy
1239 xxxxxxxxxxxxxxxx|yyyy
1240 xxxxxxxxxxxxxxxxxx|yy
1241 xxxxxxxxxxxxxxxxxxxx|
1243 \pset format aligned
1245 +----------------------+--------------------+
1246 | 0123456789abcdef | 0123456789 |
1247 +----------------------+--------------------+
1248 | xx | yyyyyyyyyyyyyyyyyy |
1249 | xxxx | yyyyyyyyyyyyyyyy |
1250 | xxxxxx | yyyyyyyyyyyyyy |
1251 | xxxxxxxx | yyyyyyyyyyyy |
1252 | xxxxxxxxxx | yyyyyyyyyy |
1253 | xxxxxxxxxxxx | yyyyyyyy |
1254 | xxxxxxxxxxxxxx | yyyyyy |
1255 | xxxxxxxxxxxxxxxx | yyyy |
1256 | xxxxxxxxxxxxxxxxxx | yy |
1257 | xxxxxxxxxxxxxxxxxxxx | |
1258 +----------------------+--------------------+
1261 \pset format wrapped
1263 +--------------------+-----------------+
1264 | 0123456789abcdef | 0123456789 |
1265 +--------------------+-----------------+
1266 | xx | yyyyyyyyyyyyyyy.|
1268 | xxxx | yyyyyyyyyyyyyyy.|
1270 | xxxxxx | yyyyyyyyyyyyyy |
1271 | xxxxxxxx | yyyyyyyyyyyy |
1272 | xxxxxxxxxx | yyyyyyyyyy |
1273 | xxxxxxxxxxxx | yyyyyyyy |
1274 | xxxxxxxxxxxxxx | yyyyyy |
1275 | xxxxxxxxxxxxxxxx | yyyy |
1276 | xxxxxxxxxxxxxxxxxx | yy |
1277 | xxxxxxxxxxxxxxxxxx.| |
1279 +--------------------+-----------------+
1285 \pset format unaligned
1288 0123456789|yyyyyyyyyyyyyyyyyy
1290 0123456789abcdef|xxxx
1291 0123456789|yyyyyyyyyyyyyyyy
1293 0123456789abcdef|xxxxxx
1294 0123456789|yyyyyyyyyyyyyy
1296 0123456789abcdef|xxxxxxxx
1297 0123456789|yyyyyyyyyyyy
1299 0123456789abcdef|xxxxxxxxxx
1300 0123456789|yyyyyyyyyy
1302 0123456789abcdef|xxxxxxxxxxxx
1305 0123456789abcdef|xxxxxxxxxxxxxx
1308 0123456789abcdef|xxxxxxxxxxxxxxxx
1311 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1314 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1316 \pset format aligned
1320 0123456789 yyyyyyyyyyyyyyyyyy
1322 0123456789abcdef xxxx
1323 0123456789 yyyyyyyyyyyyyyyy
1325 0123456789abcdef xxxxxx
1326 0123456789 yyyyyyyyyyyyyy
1328 0123456789abcdef xxxxxxxx
1329 0123456789 yyyyyyyyyyyy
1331 0123456789abcdef xxxxxxxxxx
1332 0123456789 yyyyyyyyyy
1334 0123456789abcdef xxxxxxxxxxxx
1337 0123456789abcdef xxxxxxxxxxxxxx
1340 0123456789abcdef xxxxxxxxxxxxxxxx
1343 0123456789abcdef xxxxxxxxxxxxxxxxxx
1346 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
1349 \pset format wrapped
1353 0123456789 yyyyyyyyyyyy.
1356 0123456789abcdef xxxx
1357 0123456789 yyyyyyyyyyyy.
1360 0123456789abcdef xxxxxx
1361 0123456789 yyyyyyyyyyyy.
1364 0123456789abcdef xxxxxxxx
1365 0123456789 yyyyyyyyyyyy
1367 0123456789abcdef xxxxxxxxxx
1368 0123456789 yyyyyyyyyy
1370 0123456789abcdef xxxxxxxxxxxx
1373 0123456789abcdef xxxxxxxxxxxx.
1377 0123456789abcdef xxxxxxxxxxxx.
1381 0123456789abcdef xxxxxxxxxxxx.
1385 0123456789abcdef xxxxxxxxxxxx.
1390 \pset format unaligned
1393 0123456789|yyyyyyyyyyyyyyyyyy
1395 0123456789abcdef|xxxx
1396 0123456789|yyyyyyyyyyyyyyyy
1398 0123456789abcdef|xxxxxx
1399 0123456789|yyyyyyyyyyyyyy
1401 0123456789abcdef|xxxxxxxx
1402 0123456789|yyyyyyyyyyyy
1404 0123456789abcdef|xxxxxxxxxx
1405 0123456789|yyyyyyyyyy
1407 0123456789abcdef|xxxxxxxxxxxx
1410 0123456789abcdef|xxxxxxxxxxxxxx
1413 0123456789abcdef|xxxxxxxxxxxxxxxx
1416 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1419 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1421 \pset format aligned
1423 -[ RECORD 1 ]----+---------------------
1424 0123456789abcdef | xx
1425 0123456789 | yyyyyyyyyyyyyyyyyy
1426 -[ RECORD 2 ]----+---------------------
1427 0123456789abcdef | xxxx
1428 0123456789 | yyyyyyyyyyyyyyyy
1429 -[ RECORD 3 ]----+---------------------
1430 0123456789abcdef | xxxxxx
1431 0123456789 | yyyyyyyyyyyyyy
1432 -[ RECORD 4 ]----+---------------------
1433 0123456789abcdef | xxxxxxxx
1434 0123456789 | yyyyyyyyyyyy
1435 -[ RECORD 5 ]----+---------------------
1436 0123456789abcdef | xxxxxxxxxx
1437 0123456789 | yyyyyyyyyy
1438 -[ RECORD 6 ]----+---------------------
1439 0123456789abcdef | xxxxxxxxxxxx
1440 0123456789 | yyyyyyyy
1441 -[ RECORD 7 ]----+---------------------
1442 0123456789abcdef | xxxxxxxxxxxxxx
1444 -[ RECORD 8 ]----+---------------------
1445 0123456789abcdef | xxxxxxxxxxxxxxxx
1447 -[ RECORD 9 ]----+---------------------
1448 0123456789abcdef | xxxxxxxxxxxxxxxxxx
1450 -[ RECORD 10 ]---+---------------------
1451 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
1454 \pset format wrapped
1456 -[ RECORD 1 ]----+-----------
1457 0123456789abcdef | xx
1458 0123456789 | yyyyyyyyyy.
1460 -[ RECORD 2 ]----+-----------
1461 0123456789abcdef | xxxx
1462 0123456789 | yyyyyyyyyy.
1464 -[ RECORD 3 ]----+-----------
1465 0123456789abcdef | xxxxxx
1466 0123456789 | yyyyyyyyyy.
1468 -[ RECORD 4 ]----+-----------
1469 0123456789abcdef | xxxxxxxx
1470 0123456789 | yyyyyyyyyy.
1472 -[ RECORD 5 ]----+-----------
1473 0123456789abcdef | xxxxxxxxxx
1474 0123456789 | yyyyyyyyyy
1475 -[ RECORD 6 ]----+-----------
1476 0123456789abcdef | xxxxxxxxxx.
1478 0123456789 | yyyyyyyy
1479 -[ RECORD 7 ]----+-----------
1480 0123456789abcdef | xxxxxxxxxx.
1483 -[ RECORD 8 ]----+-----------
1484 0123456789abcdef | xxxxxxxxxx.
1487 -[ RECORD 9 ]----+-----------
1488 0123456789abcdef | xxxxxxxxxx.
1491 -[ RECORD 10 ]---+-----------
1492 0123456789abcdef | xxxxxxxxxx.
1497 \pset format unaligned
1500 0123456789|yyyyyyyyyyyyyyyyyy
1502 0123456789abcdef|xxxx
1503 0123456789|yyyyyyyyyyyyyyyy
1505 0123456789abcdef|xxxxxx
1506 0123456789|yyyyyyyyyyyyyy
1508 0123456789abcdef|xxxxxxxx
1509 0123456789|yyyyyyyyyyyy
1511 0123456789abcdef|xxxxxxxxxx
1512 0123456789|yyyyyyyyyy
1514 0123456789abcdef|xxxxxxxxxxxx
1517 0123456789abcdef|xxxxxxxxxxxxxx
1520 0123456789abcdef|xxxxxxxxxxxxxxxx
1523 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1526 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1528 \pset format aligned
1530 +-[ RECORD 1 ]-----+----------------------+
1531 | 0123456789abcdef | xx |
1532 | 0123456789 | yyyyyyyyyyyyyyyyyy |
1533 +-[ RECORD 2 ]-----+----------------------+
1534 | 0123456789abcdef | xxxx |
1535 | 0123456789 | yyyyyyyyyyyyyyyy |
1536 +-[ RECORD 3 ]-----+----------------------+
1537 | 0123456789abcdef | xxxxxx |
1538 | 0123456789 | yyyyyyyyyyyyyy |
1539 +-[ RECORD 4 ]-----+----------------------+
1540 | 0123456789abcdef | xxxxxxxx |
1541 | 0123456789 | yyyyyyyyyyyy |
1542 +-[ RECORD 5 ]-----+----------------------+
1543 | 0123456789abcdef | xxxxxxxxxx |
1544 | 0123456789 | yyyyyyyyyy |
1545 +-[ RECORD 6 ]-----+----------------------+
1546 | 0123456789abcdef | xxxxxxxxxxxx |
1547 | 0123456789 | yyyyyyyy |
1548 +-[ RECORD 7 ]-----+----------------------+
1549 | 0123456789abcdef | xxxxxxxxxxxxxx |
1550 | 0123456789 | yyyyyy |
1551 +-[ RECORD 8 ]-----+----------------------+
1552 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
1553 | 0123456789 | yyyy |
1554 +-[ RECORD 9 ]-----+----------------------+
1555 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
1557 +-[ RECORD 10 ]----+----------------------+
1558 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
1560 +------------------+----------------------+
1562 \pset format wrapped
1564 +-[ RECORD 1 ]-----+---------+
1565 | 0123456789abcdef | xx |
1566 | 0123456789 | yyyyyyy.|
1569 +-[ RECORD 2 ]-----+---------+
1570 | 0123456789abcdef | xxxx |
1571 | 0123456789 | yyyyyyy.|
1574 +-[ RECORD 3 ]-----+---------+
1575 | 0123456789abcdef | xxxxxx |
1576 | 0123456789 | yyyyyyy.|
1578 +-[ RECORD 4 ]-----+---------+
1579 | 0123456789abcdef | xxxxxxx.|
1581 | 0123456789 | yyyyyyy.|
1583 +-[ RECORD 5 ]-----+---------+
1584 | 0123456789abcdef | xxxxxxx.|
1586 | 0123456789 | yyyyyyy.|
1588 +-[ RECORD 6 ]-----+---------+
1589 | 0123456789abcdef | xxxxxxx.|
1591 | 0123456789 | yyyyyyy.|
1593 +-[ RECORD 7 ]-----+---------+
1594 | 0123456789abcdef | xxxxxxx.|
1596 | 0123456789 | yyyyyy |
1597 +-[ RECORD 8 ]-----+---------+
1598 | 0123456789abcdef | xxxxxxx.|
1601 | 0123456789 | yyyy |
1602 +-[ RECORD 9 ]-----+---------+
1603 | 0123456789abcdef | xxxxxxx.|
1607 +-[ RECORD 10 ]----+---------+
1608 | 0123456789abcdef | xxxxxxx.|
1612 +------------------+---------+
1617 \pset format unaligned
1620 0123456789|yyyyyyyyyyyyyyyyyy
1622 0123456789abcdef|xxxx
1623 0123456789|yyyyyyyyyyyyyyyy
1625 0123456789abcdef|xxxxxx
1626 0123456789|yyyyyyyyyyyyyy
1628 0123456789abcdef|xxxxxxxx
1629 0123456789|yyyyyyyyyyyy
1631 0123456789abcdef|xxxxxxxxxx
1632 0123456789|yyyyyyyyyy
1634 0123456789abcdef|xxxxxxxxxxxx
1637 0123456789abcdef|xxxxxxxxxxxxxx
1640 0123456789abcdef|xxxxxxxxxxxxxxxx
1643 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1646 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1648 \pset format aligned
1652 0123456789 yyyyyyyyyyyyyyyyyy
1654 0123456789abcdef xxxx
1655 0123456789 yyyyyyyyyyyyyyyy
1657 0123456789abcdef xxxxxx
1658 0123456789 yyyyyyyyyyyyyy
1660 0123456789abcdef xxxxxxxx
1661 0123456789 yyyyyyyyyyyy
1663 0123456789abcdef xxxxxxxxxx
1664 0123456789 yyyyyyyyyy
1666 0123456789abcdef xxxxxxxxxxxx
1669 0123456789abcdef xxxxxxxxxxxxxx
1672 0123456789abcdef xxxxxxxxxxxxxxxx
1675 0123456789abcdef xxxxxxxxxxxxxxxxxx
1678 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
1681 \pset format wrapped
1692 0123456789abcdef xxx.
1701 0123456789abcdef xxx.
1709 0123456789abcdef xxx.
1717 0123456789abcdef xxx.
1726 0123456789abcdef xxx.
1734 0123456789abcdef xxx.
1742 0123456789abcdef xxx.
1751 0123456789abcdef xxx.
1759 0123456789abcdef xxx.
1769 \pset format unaligned
1772 0123456789|yyyyyyyyyyyyyyyyyy
1774 0123456789abcdef|xxxx
1775 0123456789|yyyyyyyyyyyyyyyy
1777 0123456789abcdef|xxxxxx
1778 0123456789|yyyyyyyyyyyyyy
1780 0123456789abcdef|xxxxxxxx
1781 0123456789|yyyyyyyyyyyy
1783 0123456789abcdef|xxxxxxxxxx
1784 0123456789|yyyyyyyyyy
1786 0123456789abcdef|xxxxxxxxxxxx
1789 0123456789abcdef|xxxxxxxxxxxxxx
1792 0123456789abcdef|xxxxxxxxxxxxxxxx
1795 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1798 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1800 \pset format aligned
1802 -[ RECORD 1 ]----+---------------------
1803 0123456789abcdef | xx
1804 0123456789 | yyyyyyyyyyyyyyyyyy
1805 -[ RECORD 2 ]----+---------------------
1806 0123456789abcdef | xxxx
1807 0123456789 | yyyyyyyyyyyyyyyy
1808 -[ RECORD 3 ]----+---------------------
1809 0123456789abcdef | xxxxxx
1810 0123456789 | yyyyyyyyyyyyyy
1811 -[ RECORD 4 ]----+---------------------
1812 0123456789abcdef | xxxxxxxx
1813 0123456789 | yyyyyyyyyyyy
1814 -[ RECORD 5 ]----+---------------------
1815 0123456789abcdef | xxxxxxxxxx
1816 0123456789 | yyyyyyyyyy
1817 -[ RECORD 6 ]----+---------------------
1818 0123456789abcdef | xxxxxxxxxxxx
1819 0123456789 | yyyyyyyy
1820 -[ RECORD 7 ]----+---------------------
1821 0123456789abcdef | xxxxxxxxxxxxxx
1823 -[ RECORD 8 ]----+---------------------
1824 0123456789abcdef | xxxxxxxxxxxxxxxx
1826 -[ RECORD 9 ]----+---------------------
1827 0123456789abcdef | xxxxxxxxxxxxxxxxxx
1829 -[ RECORD 10 ]---+---------------------
1830 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
1833 \pset format wrapped
1835 -[ RECORD 1 ]----+----
1836 0123456789abcdef | xx
1843 -[ RECORD 2 ]----+----
1844 0123456789abcdef | xxx.
1852 -[ RECORD 3 ]----+----
1853 0123456789abcdef | xxx.
1860 -[ RECORD 4 ]----+----
1861 0123456789abcdef | xxx.
1868 -[ RECORD 5 ]----+----
1869 0123456789abcdef | xxx.
1877 -[ RECORD 6 ]----+----
1878 0123456789abcdef | xxx.
1885 -[ RECORD 7 ]----+----
1886 0123456789abcdef | xxx.
1893 -[ RECORD 8 ]----+----
1894 0123456789abcdef | xxx.
1902 -[ RECORD 9 ]----+----
1903 0123456789abcdef | xxx.
1910 -[ RECORD 10 ]---+----
1911 0123456789abcdef | xxx.
1921 \pset format unaligned
1924 0123456789|yyyyyyyyyyyyyyyyyy
1926 0123456789abcdef|xxxx
1927 0123456789|yyyyyyyyyyyyyyyy
1929 0123456789abcdef|xxxxxx
1930 0123456789|yyyyyyyyyyyyyy
1932 0123456789abcdef|xxxxxxxx
1933 0123456789|yyyyyyyyyyyy
1935 0123456789abcdef|xxxxxxxxxx
1936 0123456789|yyyyyyyyyy
1938 0123456789abcdef|xxxxxxxxxxxx
1941 0123456789abcdef|xxxxxxxxxxxxxx
1944 0123456789abcdef|xxxxxxxxxxxxxxxx
1947 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1950 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1952 \pset format aligned
1954 +-[ RECORD 1 ]-----+----------------------+
1955 | 0123456789abcdef | xx |
1956 | 0123456789 | yyyyyyyyyyyyyyyyyy |
1957 +-[ RECORD 2 ]-----+----------------------+
1958 | 0123456789abcdef | xxxx |
1959 | 0123456789 | yyyyyyyyyyyyyyyy |
1960 +-[ RECORD 3 ]-----+----------------------+
1961 | 0123456789abcdef | xxxxxx |
1962 | 0123456789 | yyyyyyyyyyyyyy |
1963 +-[ RECORD 4 ]-----+----------------------+
1964 | 0123456789abcdef | xxxxxxxx |
1965 | 0123456789 | yyyyyyyyyyyy |
1966 +-[ RECORD 5 ]-----+----------------------+
1967 | 0123456789abcdef | xxxxxxxxxx |
1968 | 0123456789 | yyyyyyyyyy |
1969 +-[ RECORD 6 ]-----+----------------------+
1970 | 0123456789abcdef | xxxxxxxxxxxx |
1971 | 0123456789 | yyyyyyyy |
1972 +-[ RECORD 7 ]-----+----------------------+
1973 | 0123456789abcdef | xxxxxxxxxxxxxx |
1974 | 0123456789 | yyyyyy |
1975 +-[ RECORD 8 ]-----+----------------------+
1976 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
1977 | 0123456789 | yyyy |
1978 +-[ RECORD 9 ]-----+----------------------+
1979 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
1981 +-[ RECORD 10 ]----+----------------------+
1982 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
1984 +------------------+----------------------+
1986 \pset format wrapped
1988 +-[ RECORD 1 ]-----+-----+
1989 | 0123456789abcdef | xx |
1990 | 0123456789 | yyy.|
1996 +-[ RECORD 2 ]-----+-----+
1997 | 0123456789abcdef | xxx.|
1999 | 0123456789 | yyy.|
2005 +-[ RECORD 3 ]-----+-----+
2006 | 0123456789abcdef | xxx.|
2008 | 0123456789 | yyy.|
2013 +-[ RECORD 4 ]-----+-----+
2014 | 0123456789abcdef | xxx.|
2017 | 0123456789 | yyy.|
2021 +-[ RECORD 5 ]-----+-----+
2022 | 0123456789abcdef | xxx.|
2026 | 0123456789 | yyy.|
2030 +-[ RECORD 6 ]-----+-----+
2031 | 0123456789abcdef | xxx.|
2035 | 0123456789 | yyy.|
2038 +-[ RECORD 7 ]-----+-----+
2039 | 0123456789abcdef | xxx.|
2044 | 0123456789 | yyy.|
2046 +-[ RECORD 8 ]-----+-----+
2047 | 0123456789abcdef | xxx.|
2053 | 0123456789 | yyy.|
2055 +-[ RECORD 9 ]-----+-----+
2056 | 0123456789abcdef | xxx.|
2063 +-[ RECORD 10 ]----+-----+
2064 | 0123456789abcdef | xxx.|
2072 +------------------+-----+
2074 \pset linestyle old-ascii
2078 \pset format unaligned
2080 0123456789abcdef|0123456789
2081 xx|yyyyyyyyyyyyyyyyyy
2082 xxxx|yyyyyyyyyyyyyyyy
2083 xxxxxx|yyyyyyyyyyyyyy
2084 xxxxxxxx|yyyyyyyyyyyy
2085 xxxxxxxxxx|yyyyyyyyyy
2086 xxxxxxxxxxxx|yyyyyyyy
2087 xxxxxxxxxxxxxx|yyyyyy
2088 xxxxxxxxxxxxxxxx|yyyy
2089 xxxxxxxxxxxxxxxxxx|yy
2090 xxxxxxxxxxxxxxxxxxxx|
2092 \pset format aligned
2094 0123456789abcdef 0123456789
2095 -------------------- ------------------
2096 xx yyyyyyyyyyyyyyyyyy
2097 xxxx yyyyyyyyyyyyyyyy
2098 xxxxxx yyyyyyyyyyyyyy
2099 xxxxxxxx yyyyyyyyyyyy
2100 xxxxxxxxxx yyyyyyyyyy
2101 xxxxxxxxxxxx yyyyyyyy
2102 xxxxxxxxxxxxxx yyyyyy
2103 xxxxxxxxxxxxxxxx yyyy
2104 xxxxxxxxxxxxxxxxxx yy
2105 xxxxxxxxxxxxxxxxxxxx
2108 \pset format wrapped
2110 0123456789abcdef 0123456789
2111 -------------------- ------------------
2112 xx yyyyyyyyyyyyyyyyyy
2113 xxxx yyyyyyyyyyyyyyyy
2114 xxxxxx yyyyyyyyyyyyyy
2115 xxxxxxxx yyyyyyyyyyyy
2116 xxxxxxxxxx yyyyyyyyyy
2117 xxxxxxxxxxxx yyyyyyyy
2118 xxxxxxxxxxxxxx yyyyyy
2119 xxxxxxxxxxxxxxxx yyyy
2120 xxxxxxxxxxxxxxxxxx yy
2121 xxxxxxxxxxxxxxxxxxxx
2125 \pset format unaligned
2127 0123456789abcdef|0123456789
2128 xx|yyyyyyyyyyyyyyyyyy
2129 xxxx|yyyyyyyyyyyyyyyy
2130 xxxxxx|yyyyyyyyyyyyyy
2131 xxxxxxxx|yyyyyyyyyyyy
2132 xxxxxxxxxx|yyyyyyyyyy
2133 xxxxxxxxxxxx|yyyyyyyy
2134 xxxxxxxxxxxxxx|yyyyyy
2135 xxxxxxxxxxxxxxxx|yyyy
2136 xxxxxxxxxxxxxxxxxx|yy
2137 xxxxxxxxxxxxxxxxxxxx|
2139 \pset format aligned
2141 0123456789abcdef | 0123456789
2142 ----------------------+--------------------
2143 xx | yyyyyyyyyyyyyyyyyy
2144 xxxx | yyyyyyyyyyyyyyyy
2145 xxxxxx | yyyyyyyyyyyyyy
2146 xxxxxxxx | yyyyyyyyyyyy
2147 xxxxxxxxxx | yyyyyyyyyy
2148 xxxxxxxxxxxx | yyyyyyyy
2149 xxxxxxxxxxxxxx | yyyyyy
2150 xxxxxxxxxxxxxxxx | yyyy
2151 xxxxxxxxxxxxxxxxxx | yy
2152 xxxxxxxxxxxxxxxxxxxx |
2155 \pset format wrapped
2157 0123456789abcdef | 0123456789
2158 ---------------------+------------------
2159 xx | yyyyyyyyyyyyyyyy
2161 xxxx | yyyyyyyyyyyyyyyy
2162 xxxxxx | yyyyyyyyyyyyyy
2163 xxxxxxxx | yyyyyyyyyyyy
2164 xxxxxxxxxx | yyyyyyyyyy
2165 xxxxxxxxxxxx | yyyyyyyy
2166 xxxxxxxxxxxxxx | yyyyyy
2167 xxxxxxxxxxxxxxxx | yyyy
2168 xxxxxxxxxxxxxxxxxx | yy
2169 xxxxxxxxxxxxxxxxxxx |
2174 \pset format unaligned
2176 0123456789abcdef|0123456789
2177 xx|yyyyyyyyyyyyyyyyyy
2178 xxxx|yyyyyyyyyyyyyyyy
2179 xxxxxx|yyyyyyyyyyyyyy
2180 xxxxxxxx|yyyyyyyyyyyy
2181 xxxxxxxxxx|yyyyyyyyyy
2182 xxxxxxxxxxxx|yyyyyyyy
2183 xxxxxxxxxxxxxx|yyyyyy
2184 xxxxxxxxxxxxxxxx|yyyy
2185 xxxxxxxxxxxxxxxxxx|yy
2186 xxxxxxxxxxxxxxxxxxxx|
2188 \pset format aligned
2190 +----------------------+--------------------+
2191 | 0123456789abcdef | 0123456789 |
2192 +----------------------+--------------------+
2193 | xx | yyyyyyyyyyyyyyyyyy |
2194 | xxxx | yyyyyyyyyyyyyyyy |
2195 | xxxxxx | yyyyyyyyyyyyyy |
2196 | xxxxxxxx | yyyyyyyyyyyy |
2197 | xxxxxxxxxx | yyyyyyyyyy |
2198 | xxxxxxxxxxxx | yyyyyyyy |
2199 | xxxxxxxxxxxxxx | yyyyyy |
2200 | xxxxxxxxxxxxxxxx | yyyy |
2201 | xxxxxxxxxxxxxxxxxx | yy |
2202 | xxxxxxxxxxxxxxxxxxxx | |
2203 +----------------------+--------------------+
2206 \pset format wrapped
2208 +--------------------+-----------------+
2209 | 0123456789abcdef | 0123456789 |
2210 +--------------------+-----------------+
2211 | xx | yyyyyyyyyyyyyyy |
2213 | xxxx | yyyyyyyyyyyyyyy |
2215 | xxxxxx | yyyyyyyyyyyyyy |
2216 | xxxxxxxx | yyyyyyyyyyyy |
2217 | xxxxxxxxxx | yyyyyyyyyy |
2218 | xxxxxxxxxxxx | yyyyyyyy |
2219 | xxxxxxxxxxxxxx | yyyyyy |
2220 | xxxxxxxxxxxxxxxx | yyyy |
2221 | xxxxxxxxxxxxxxxxxx | yy |
2222 | xxxxxxxxxxxxxxxxxx | |
2224 +--------------------+-----------------+
2229 \pset format unaligned
2232 0123456789|yyyyyyyyyyyyyyyyyy
2234 0123456789abcdef|xxxx
2235 0123456789|yyyyyyyyyyyyyyyy
2237 0123456789abcdef|xxxxxx
2238 0123456789|yyyyyyyyyyyyyy
2240 0123456789abcdef|xxxxxxxx
2241 0123456789|yyyyyyyyyyyy
2243 0123456789abcdef|xxxxxxxxxx
2244 0123456789|yyyyyyyyyy
2246 0123456789abcdef|xxxxxxxxxxxx
2249 0123456789abcdef|xxxxxxxxxxxxxx
2252 0123456789abcdef|xxxxxxxxxxxxxxxx
2255 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2258 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2260 \pset format aligned
2264 0123456789 yyyyyyyyyyyyyyyyyy
2266 0123456789abcdef xxxx
2267 0123456789 yyyyyyyyyyyyyyyy
2269 0123456789abcdef xxxxxx
2270 0123456789 yyyyyyyyyyyyyy
2272 0123456789abcdef xxxxxxxx
2273 0123456789 yyyyyyyyyyyy
2275 0123456789abcdef xxxxxxxxxx
2276 0123456789 yyyyyyyyyy
2278 0123456789abcdef xxxxxxxxxxxx
2281 0123456789abcdef xxxxxxxxxxxxxx
2284 0123456789abcdef xxxxxxxxxxxxxxxx
2287 0123456789abcdef xxxxxxxxxxxxxxxxxx
2290 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
2293 \pset format wrapped
2297 0123456789 yyyyyyyyyyyyyyyyyy
2299 0123456789abcdef xxxx
2300 0123456789 yyyyyyyyyyyyyyyy
2302 0123456789abcdef xxxxxx
2303 0123456789 yyyyyyyyyyyyyy
2305 0123456789abcdef xxxxxxxx
2306 0123456789 yyyyyyyyyyyy
2308 0123456789abcdef xxxxxxxxxx
2309 0123456789 yyyyyyyyyy
2311 0123456789abcdef xxxxxxxxxxxx
2314 0123456789abcdef xxxxxxxxxxxxxx
2317 0123456789abcdef xxxxxxxxxxxxxxxx
2320 0123456789abcdef xxxxxxxxxxxxxxxxxx
2323 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
2327 \pset format unaligned
2330 0123456789|yyyyyyyyyyyyyyyyyy
2332 0123456789abcdef|xxxx
2333 0123456789|yyyyyyyyyyyyyyyy
2335 0123456789abcdef|xxxxxx
2336 0123456789|yyyyyyyyyyyyyy
2338 0123456789abcdef|xxxxxxxx
2339 0123456789|yyyyyyyyyyyy
2341 0123456789abcdef|xxxxxxxxxx
2342 0123456789|yyyyyyyyyy
2344 0123456789abcdef|xxxxxxxxxxxx
2347 0123456789abcdef|xxxxxxxxxxxxxx
2350 0123456789abcdef|xxxxxxxxxxxxxxxx
2353 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2356 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2358 \pset format aligned
2360 -[ RECORD 1 ]----+---------------------
2361 0123456789abcdef | xx
2362 0123456789 | yyyyyyyyyyyyyyyyyy
2363 -[ RECORD 2 ]----+---------------------
2364 0123456789abcdef | xxxx
2365 0123456789 | yyyyyyyyyyyyyyyy
2366 -[ RECORD 3 ]----+---------------------
2367 0123456789abcdef | xxxxxx
2368 0123456789 | yyyyyyyyyyyyyy
2369 -[ RECORD 4 ]----+---------------------
2370 0123456789abcdef | xxxxxxxx
2371 0123456789 | yyyyyyyyyyyy
2372 -[ RECORD 5 ]----+---------------------
2373 0123456789abcdef | xxxxxxxxxx
2374 0123456789 | yyyyyyyyyy
2375 -[ RECORD 6 ]----+---------------------
2376 0123456789abcdef | xxxxxxxxxxxx
2377 0123456789 | yyyyyyyy
2378 -[ RECORD 7 ]----+---------------------
2379 0123456789abcdef | xxxxxxxxxxxxxx
2381 -[ RECORD 8 ]----+---------------------
2382 0123456789abcdef | xxxxxxxxxxxxxxxx
2384 -[ RECORD 9 ]----+---------------------
2385 0123456789abcdef | xxxxxxxxxxxxxxxxxx
2387 -[ RECORD 10 ]---+---------------------
2388 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
2391 \pset format wrapped
2393 -[ RECORD 1 ]----+---------------------
2394 0123456789abcdef | xx
2395 0123456789 | yyyyyyyyyyyyyyyyyy
2396 -[ RECORD 2 ]----+---------------------
2397 0123456789abcdef | xxxx
2398 0123456789 | yyyyyyyyyyyyyyyy
2399 -[ RECORD 3 ]----+---------------------
2400 0123456789abcdef | xxxxxx
2401 0123456789 | yyyyyyyyyyyyyy
2402 -[ RECORD 4 ]----+---------------------
2403 0123456789abcdef | xxxxxxxx
2404 0123456789 | yyyyyyyyyyyy
2405 -[ RECORD 5 ]----+---------------------
2406 0123456789abcdef | xxxxxxxxxx
2407 0123456789 | yyyyyyyyyy
2408 -[ RECORD 6 ]----+---------------------
2409 0123456789abcdef | xxxxxxxxxxxx
2410 0123456789 | yyyyyyyy
2411 -[ RECORD 7 ]----+---------------------
2412 0123456789abcdef | xxxxxxxxxxxxxx
2414 -[ RECORD 8 ]----+---------------------
2415 0123456789abcdef | xxxxxxxxxxxxxxxx
2417 -[ RECORD 9 ]----+---------------------
2418 0123456789abcdef | xxxxxxxxxxxxxxxxxx
2420 -[ RECORD 10 ]---+---------------------
2421 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
2425 \pset format unaligned
2428 0123456789|yyyyyyyyyyyyyyyyyy
2430 0123456789abcdef|xxxx
2431 0123456789|yyyyyyyyyyyyyyyy
2433 0123456789abcdef|xxxxxx
2434 0123456789|yyyyyyyyyyyyyy
2436 0123456789abcdef|xxxxxxxx
2437 0123456789|yyyyyyyyyyyy
2439 0123456789abcdef|xxxxxxxxxx
2440 0123456789|yyyyyyyyyy
2442 0123456789abcdef|xxxxxxxxxxxx
2445 0123456789abcdef|xxxxxxxxxxxxxx
2448 0123456789abcdef|xxxxxxxxxxxxxxxx
2451 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2454 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2456 \pset format aligned
2458 +-[ RECORD 1 ]-----+----------------------+
2459 | 0123456789abcdef | xx |
2460 | 0123456789 | yyyyyyyyyyyyyyyyyy |
2461 +-[ RECORD 2 ]-----+----------------------+
2462 | 0123456789abcdef | xxxx |
2463 | 0123456789 | yyyyyyyyyyyyyyyy |
2464 +-[ RECORD 3 ]-----+----------------------+
2465 | 0123456789abcdef | xxxxxx |
2466 | 0123456789 | yyyyyyyyyyyyyy |
2467 +-[ RECORD 4 ]-----+----------------------+
2468 | 0123456789abcdef | xxxxxxxx |
2469 | 0123456789 | yyyyyyyyyyyy |
2470 +-[ RECORD 5 ]-----+----------------------+
2471 | 0123456789abcdef | xxxxxxxxxx |
2472 | 0123456789 | yyyyyyyyyy |
2473 +-[ RECORD 6 ]-----+----------------------+
2474 | 0123456789abcdef | xxxxxxxxxxxx |
2475 | 0123456789 | yyyyyyyy |
2476 +-[ RECORD 7 ]-----+----------------------+
2477 | 0123456789abcdef | xxxxxxxxxxxxxx |
2478 | 0123456789 | yyyyyy |
2479 +-[ RECORD 8 ]-----+----------------------+
2480 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
2481 | 0123456789 | yyyy |
2482 +-[ RECORD 9 ]-----+----------------------+
2483 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
2485 +-[ RECORD 10 ]----+----------------------+
2486 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
2488 +------------------+----------------------+
2490 \pset format wrapped
2492 +-[ RECORD 1 ]-----+-------------------+
2493 | 0123456789abcdef | xx |
2494 | 0123456789 | yyyyyyyyyyyyyyyyy |
2496 +-[ RECORD 2 ]-----+-------------------+
2497 | 0123456789abcdef | xxxx |
2498 | 0123456789 | yyyyyyyyyyyyyyyy |
2499 +-[ RECORD 3 ]-----+-------------------+
2500 | 0123456789abcdef | xxxxxx |
2501 | 0123456789 | yyyyyyyyyyyyyy |
2502 +-[ RECORD 4 ]-----+-------------------+
2503 | 0123456789abcdef | xxxxxxxx |
2504 | 0123456789 | yyyyyyyyyyyy |
2505 +-[ RECORD 5 ]-----+-------------------+
2506 | 0123456789abcdef | xxxxxxxxxx |
2507 | 0123456789 | yyyyyyyyyy |
2508 +-[ RECORD 6 ]-----+-------------------+
2509 | 0123456789abcdef | xxxxxxxxxxxx |
2510 | 0123456789 | yyyyyyyy |
2511 +-[ RECORD 7 ]-----+-------------------+
2512 | 0123456789abcdef | xxxxxxxxxxxxxx |
2513 | 0123456789 | yyyyyy |
2514 +-[ RECORD 8 ]-----+-------------------+
2515 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
2516 | 0123456789 | yyyy |
2517 +-[ RECORD 9 ]-----+-------------------+
2518 | 0123456789abcdef | xxxxxxxxxxxxxxxxx |
2521 +-[ RECORD 10 ]----+-------------------+
2522 | 0123456789abcdef | xxxxxxxxxxxxxxxxx |
2525 +------------------+-------------------+
2528 \pset linestyle ascii
2529 prepare q as select ' | = | lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&' as " | -- | 012345678 9abc def!*@#&!@(*&*~~_+-=\ \", '11' as "0123456789", 11 as int from generate_series(1,10) as n;
2530 \pset format asciidoc
2535 [options="header",cols="<l,<l,>l",frame="none",grid="none"]
2537 ^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
2538 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2539 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2540 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2541 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2542 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2543 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2544 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2545 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2546 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2547 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2556 [options="header",cols="<l,<l,>l",frame="none"]
2558 ^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
2559 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2560 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2561 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2562 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2563 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2564 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2565 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2566 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2567 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2568 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2577 [options="header",cols="<l,<l,>l",frame="all",grid="all"]
2579 ^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
2580 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2581 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2582 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2583 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2584 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2585 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2586 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2587 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2588 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2589 | \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
2599 [cols="h,l",frame="none",grid="none"]
2602 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2606 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2610 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2614 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2618 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2622 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2626 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2630 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2634 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2638 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2645 [cols="h,l",frame="none"]
2648 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2652 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2656 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2660 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2664 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2668 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2672 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2676 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2680 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2684 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2691 [cols="h,l",frame="all",grid="all"]
2694 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2698 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2702 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2706 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2710 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2714 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2718 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2722 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2726 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2730 <l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
2735 \pset format aligned
2738 -- tests for \if ... \endif
2746 select 'still okay';
2756 -- at this point query buffer should still have last valid line
2763 -- \if should work okay on part of a query
2776 select \if false \\ (bogus \else \\ 42 \endif \\ forty_two;
2782 -- test a large nested if using a variety of true-equivalents
2790 \echo 'should not print #1-1'
2793 \echo 'should not print #1-2'
2796 \echo 'should not print #1-3'
2799 \echo 'should not print #1-4'
2801 -- test a variety of false-equivalents in an if/elif/else structure
2803 \echo 'should not print #2-1'
2805 \echo 'should not print #2-2'
2807 \echo 'should not print #2-3'
2809 \echo 'should not print #2-4'
2814 -- test simple true-then-else
2816 \echo 'first thing true'
2819 \echo 'should not print #3-1'
2821 -- test simple false-true-else
2823 \echo 'should not print #4-1'
2825 \echo 'second thing true'
2828 \echo 'should not print #5-1'
2830 -- invalid boolean expressions are false
2831 \if invalid boolean expression
2832 unrecognized value "invalid boolean expression" for "\if expression": boolean expected
2833 \echo 'will not print #6-1'
2835 \echo 'will print anyway #6-2'
2836 will print anyway #6-2
2838 -- test un-matched endif
2840 \endif: no matching \if
2841 -- test un-matched else
2843 \else: no matching \if
2844 -- test un-matched elif
2846 \elif: no matching \if
2847 -- test double-else error
2851 \else: cannot occur after \else
2853 -- test elif out-of-order
2857 \elif: cannot occur after \else
2859 -- test if-endif matching in a false branch
2862 \echo 'should not print #7-1'
2864 \echo 'should not print #7-2'
2866 \echo 'should not print #7-3'
2868 \echo 'should print #7-4'
2871 -- show that vars and backticks are not expanded when ignoring extra args
2873 \echo :foo :'foo' :"foo"
2875 \pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
2876 \pset: extra argument "nosuchcommand" ignored
2877 \pset: extra argument ":foo" ignored
2878 \pset: extra argument ":'foo'" ignored
2879 \pset: extra argument ":"foo"" ignored
2880 -- show that vars and backticks are not expanded and commands are ignored
2881 -- when in a false if-branch
2882 \set try_to_quit '\\q'
2885 \echo `nosuchcommand` :foo :'foo' :"foo"
2886 \pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
2887 \a \C arg1 \c arg1 arg2 arg3 arg4 \cd arg1 \conninfo
2888 \copy arg1 arg2 arg3 arg4 arg5 arg6
2889 \copyright \dt arg1 \e arg1 arg2
2892 \echo arg1 arg2 arg3 arg4 arg5 \echo arg1 \encoding arg1 \errverbose
2893 \g arg1 \gx arg1 \gexec \h \html \i arg1 \ir arg1 \l arg1 \lo arg1 arg2
2894 \o arg1 \p \password arg1 \prompt arg1 arg2 \pset arg1 arg2 \q
2895 \reset \s arg1 \set arg1 arg2 arg3 arg4 arg5 arg6 arg7 \setenv arg1 arg2
2898 \t arg1 \T arg1 \timing arg1 \unset arg1 \w arg1 \watch arg1 \x arg1
2899 -- \else here is eaten as part of OT_FILEPIPE argument
2900 \w |/no/such/file \else
2901 -- \endif here is eaten as part of whole-line argument
2902 \! whole_line \endif
2904 \echo 'should print #8-1'
2908 \set SHOW_CONTEXT never
2912 raise exception 'bar';
2916 \set SHOW_CONTEXT errors
2920 raise exception 'bar';
2924 CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE
2925 \set SHOW_CONTEXT always
2929 raise exception 'bar';
2932 CONTEXT: PL/pgSQL function inline_code_block line 3 at RAISE
2934 CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE
2935 -- test printing and clearing the query buffer