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
54 -- \gx should work in FETCH_COUNT mode too
56 SELECT 1 as one, 2 as two \g
67 SELECT 3 as three, 4 as four \gx
79 -- \g/\gx with pset options
80 SELECT 1 as one, 2 as two \g (format=csv csv_fieldsep='\t')
89 SELECT 1 as one, 2 as two \gx (title='foo bar')
102 select 10 as test01, 20 as test02, 'Hello' as test03 \gset pref01_
103 \echo :pref01_test01 :pref01_test02 :pref01_test03
105 -- should fail: bad variable name
106 select 10 as "bad name"
108 invalid variable name: "bad name"
109 select 97 as "EOF", 'ok' as _foo \gset IGNORE
110 attempt to \gset into specially treated variable "IGNOREEOF" ignored
111 \echo :IGNORE_foo :IGNOREEOF
113 -- multiple backslash commands in one line
114 select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
116 select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
119 select 5 as x, 6 as y \gset pref01_ \\ \g \echo :pref01_x :pref01_y
126 select 7 as x, 8 as y \g \gset pref01_ \echo :pref01_x :pref01_y
133 -- NULL should unset the variable
135 select 1 as var1, NULL as var2, 3 as var3 \gset
136 \echo :var1 :var2 :var3
138 -- \gset requires just one tuple
139 select 10 as test01, 20 as test02 from generate_series(1,3) \gset
140 more than one row returned for \gset
141 select 10 as test01, 20 as test02 from generate_series(1,0) \gset
142 no rows returned for \gset
143 -- \gset should work in FETCH_COUNT mode too
145 select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
147 select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
150 select 10 as test01, 20 as test02 from generate_series(1,3) \gset
151 more than one row returned for \gset
152 select 10 as test01, 20 as test02 from generate_series(1,0) \gset
153 no rows returned for \gset
163 'foo'::varchar(4) as six,
167 --------+----------------------
173 five | double precision
174 six | character varying(4)
178 -- should work with tuple-returning utilities, such as EXECUTE
179 PREPARE test AS SELECT 1 AS first, 2 AS second;
187 EXPLAIN EXECUTE test \gdesc
193 -- should fail cleanly - syntax error
195 ERROR: syntax error at end of input
198 -- check behavior with empty results
200 The command has no result, or the result has no columns.
201 CREATE TABLE bububu(a int) \gdesc
202 The command has no result, or the result has no columns.
203 -- subject command should not have executed
204 TABLE bububu; -- fail
205 ERROR: relation "bububu" does not exist
206 LINE 1: TABLE bububu;
208 -- query buffer should remain unchanged
209 SELECT 1 AS x, 'Hello', 2 AS y, true AS "dirty\name"
212 ------------+---------
220 x | ?column? | y | dirty\name
221 ---+----------+---+------------
226 SELECT 3 AS x, 'Hello', 4 AS y, true AS "dirty\name" \gdesc \g
228 ------------+---------
235 x | ?column? | y | dirty\name
236 ---+----------+---+------------
241 create temporary table gexec_test(a int, b text, c date, d float);
242 select format('create index on gexec_test(%I)', attname)
244 where attrelid = 'gexec_test'::regclass and attnum > 0
247 create index on gexec_test(a)
248 create index on gexec_test(b)
249 create index on gexec_test(c)
250 create index on gexec_test(d)
251 -- \gexec should work in FETCH_COUNT mode too
252 -- (though the fetch limit applies to the executed queries not the meta query)
254 select 'select 1 as ones', 'select x.y, x.y*2 as double from generate_series(1,4) as x(y)'
256 select 'drop table gexec_test', NULL
258 select 'drop table gexec_test', 'select ''2000-01-01''::date as party_over'
266 select x.y, x.y*2 as double from generate_series(1,4) as x(y)
275 drop table gexec_test
276 drop table gexec_test
277 ERROR: table "gexec_test" does not exist
278 select '2000-01-01'::date as party_over
285 -- show all pset options
305 unicode_border_linestyle single
306 unicode_column_linestyle single
307 unicode_header_linestyle single
308 -- test multi-line headers, wrapping, and newline indicators
309 -- in aligned, unaligned, and wrapped formats
310 prepare q as select array_to_string(array_agg(repeat('x',2*n)),E'\n') as "ab
312 c", array_to_string(array_agg(repeat('y',20-2*n)),E'\n') as "a
313 bc" from generate_series(1,10) as n(n) group by n>1 order by n>1;
314 \pset linestyle ascii
318 \pset format unaligned
324 xx|yyyyyyyyyyyyyyyyyy
333 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
348 -------------------- ------------------
349 xx yyyyyyyyyyyyyyyyyy
350 xxxx +yyyyyyyyyyyyyyyy +
351 xxxxxx +yyyyyyyyyyyyyy +
352 xxxxxxxx +yyyyyyyyyyyy +
353 xxxxxxxxxx +yyyyyyyyyy +
354 xxxxxxxxxxxx +yyyyyyyy +
355 xxxxxxxxxxxxxx +yyyyyy +
356 xxxxxxxxxxxxxxxx +yyyy +
357 xxxxxxxxxxxxxxxxxx +yy +
366 -------------------- ------------------
367 xx yyyyyyyyyyyyyyyyyy
368 xxxx +yyyyyyyyyyyyyyyy +
369 xxxxxx +yyyyyyyyyyyyyy +
370 xxxxxxxx +yyyyyyyyyyyy +
371 xxxxxxxxxx +yyyyyyyyyy +
372 xxxxxxxxxxxx +yyyyyyyy +
373 xxxxxxxxxxxxxx +yyyyyy +
374 xxxxxxxxxxxxxxxx +yyyy +
375 xxxxxxxxxxxxxxxxxx +yy +
380 \pset format unaligned
386 xx|yyyyyyyyyyyyyyyyyy
395 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
410 ----------------------+--------------------
411 xx | yyyyyyyyyyyyyyyyyy
412 xxxx +| yyyyyyyyyyyyyyyy +
413 xxxxxx +| yyyyyyyyyyyyyy +
414 xxxxxxxx +| yyyyyyyyyyyy +
415 xxxxxxxxxx +| yyyyyyyyyy +
416 xxxxxxxxxxxx +| yyyyyyyy +
417 xxxxxxxxxxxxxx +| yyyyyy +
418 xxxxxxxxxxxxxxxx +| yyyy +
419 xxxxxxxxxxxxxxxxxx +| yy +
420 xxxxxxxxxxxxxxxxxxxx |
428 -------------------+--------------------
429 xx | yyyyyyyyyyyyyyyyyy
430 xxxx +| yyyyyyyyyyyyyyyy +
431 xxxxxx +| yyyyyyyyyyyyyy +
432 xxxxxxxx +| yyyyyyyyyyyy +
433 xxxxxxxxxx +| yyyyyyyyyy +
434 xxxxxxxxxxxx +| yyyyyyyy +
435 xxxxxxxxxxxxxx +| yyyyyy +
436 xxxxxxxxxxxxxxxx +| yyyy +
437 xxxxxxxxxxxxxxxxx.| yy +
444 \pset format unaligned
450 xx|yyyyyyyyyyyyyyyyyy
459 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
471 +----------------------+--------------------+
475 +----------------------+--------------------+
476 | xx | yyyyyyyyyyyyyyyyyy |
477 | xxxx +| yyyyyyyyyyyyyyyy +|
478 | xxxxxx +| yyyyyyyyyyyyyy +|
479 | xxxxxxxx +| yyyyyyyyyyyy +|
480 | xxxxxxxxxx +| yyyyyyyyyy +|
481 | xxxxxxxxxxxx +| yyyyyyyy +|
482 | xxxxxxxxxxxxxx +| yyyyyy +|
483 | xxxxxxxxxxxxxxxx +| yyyy +|
484 | xxxxxxxxxxxxxxxxxx +| yy +|
485 | xxxxxxxxxxxxxxxxxxxx | |
486 +----------------------+--------------------+
491 +-----------------+--------------------+
495 +-----------------+--------------------+
496 | xx | yyyyyyyyyyyyyyyyyy |
497 | xxxx +| yyyyyyyyyyyyyyyy +|
498 | xxxxxx +| yyyyyyyyyyyyyy +|
499 | xxxxxxxx +| yyyyyyyyyyyy +|
500 | xxxxxxxxxx +| yyyyyyyyyy +|
501 | xxxxxxxxxxxx +| yyyyyyyy +|
502 | xxxxxxxxxxxxxx +| yyyyyy +|
503 | xxxxxxxxxxxxxxx.| yyyy +|
505 | xxxxxxxxxxxxxxx.| |
507 | xxxxxxxxxxxxxxx.| |
509 +-----------------+--------------------+
515 \pset format unaligned
521 bc|yyyyyyyyyyyyyyyyyy
550 a + yyyyyyyyyyyyyyyyyy
562 a + yyyyyyyyyyyyyyyy +
605 \pset format unaligned
611 bc|yyyyyyyyyyyyyyyyyy
636 -[ RECORD 1 ]------------
640 a +| yyyyyyyyyyyyyyyyyy
642 -[ RECORD 2 ]------------
650 | xxxxxxxxxxxxxxxxxx +
651 | xxxxxxxxxxxxxxxxxxxx
652 a +| yyyyyyyyyyyyyyyy +
653 bc | yyyyyyyyyyyyyy +
695 \pset format unaligned
701 bc|yyyyyyyyyyyyyyyyyy
726 +-[ RECORD 1 ]--------------+
730 | a +| yyyyyyyyyyyyyyyyyy |
732 +-[ RECORD 2 ]--------------+
738 | | xxxxxxxxxxxxxx +|
739 | | xxxxxxxxxxxxxxxx +|
740 | | xxxxxxxxxxxxxxxxxx +|
741 | | xxxxxxxxxxxxxxxxxxxx |
742 | a +| yyyyyyyyyyyyyyyy +|
743 | bc | yyyyyyyyyyyyyy +|
751 +----+----------------------+
790 \pset linestyle old-ascii
794 \pset format unaligned
800 xx|yyyyyyyyyyyyyyyyyy
809 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
824 -------------------- ------------------
825 xx yyyyyyyyyyyyyyyyyy
826 xxxx yyyyyyyyyyyyyyyy
827 xxxxxx yyyyyyyyyyyyyy
828 xxxxxxxx yyyyyyyyyyyy
829 xxxxxxxxxx yyyyyyyyyy
830 xxxxxxxxxxxx yyyyyyyy
831 xxxxxxxxxxxxxx yyyyyy
832 xxxxxxxxxxxxxxxx yyyy
833 xxxxxxxxxxxxxxxxxx yy
842 -------------------- ------------------
843 xx yyyyyyyyyyyyyyyyyy
844 xxxx yyyyyyyyyyyyyyyy
845 xxxxxx yyyyyyyyyyyyyy
846 xxxxxxxx yyyyyyyyyyyy
847 xxxxxxxxxx yyyyyyyyyy
848 xxxxxxxxxxxx yyyyyyyy
849 xxxxxxxxxxxxxx yyyyyy
850 xxxxxxxxxxxxxxxx yyyy
851 xxxxxxxxxxxxxxxxxx yy
856 \pset format unaligned
862 xx|yyyyyyyyyyyyyyyyyy
871 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
886 ----------------------+--------------------
887 xx | yyyyyyyyyyyyyyyyyy
888 xxxx | yyyyyyyyyyyyyyyy
889 xxxxxx : yyyyyyyyyyyyyy
890 xxxxxxxx : yyyyyyyyyyyy
891 xxxxxxxxxx : yyyyyyyyyy
892 xxxxxxxxxxxx : yyyyyyyy
893 xxxxxxxxxxxxxx : yyyyyy
894 xxxxxxxxxxxxxxxx : yyyy
895 xxxxxxxxxxxxxxxxxx : yy
896 xxxxxxxxxxxxxxxxxxxx :
904 -------------------+--------------------
905 xx | yyyyyyyyyyyyyyyyyy
906 xxxx | yyyyyyyyyyyyyyyy
907 xxxxxx : yyyyyyyyyyyyyy
908 xxxxxxxx : yyyyyyyyyyyy
909 xxxxxxxxxx : yyyyyyyyyy
910 xxxxxxxxxxxx : yyyyyyyy
911 xxxxxxxxxxxxxx : yyyyyy
912 xxxxxxxxxxxxxxxx : yyyy
913 xxxxxxxxxxxxxxxxx : yy
920 \pset format unaligned
926 xx|yyyyyyyyyyyyyyyyyy
935 xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
947 +----------------------+--------------------+
951 +----------------------+--------------------+
952 | xx | yyyyyyyyyyyyyyyyyy |
953 | xxxx | yyyyyyyyyyyyyyyy |
954 | xxxxxx : yyyyyyyyyyyyyy |
955 | xxxxxxxx : yyyyyyyyyyyy |
956 | xxxxxxxxxx : yyyyyyyyyy |
957 | xxxxxxxxxxxx : yyyyyyyy |
958 | xxxxxxxxxxxxxx : yyyyyy |
959 | xxxxxxxxxxxxxxxx : yyyy |
960 | xxxxxxxxxxxxxxxxxx : yy |
961 | xxxxxxxxxxxxxxxxxxxx : |
962 +----------------------+--------------------+
967 +-----------------+--------------------+
971 +-----------------+--------------------+
972 | xx | yyyyyyyyyyyyyyyyyy |
973 | xxxx | yyyyyyyyyyyyyyyy |
974 | xxxxxx : yyyyyyyyyyyyyy |
975 | xxxxxxxx : yyyyyyyyyyyy |
976 | xxxxxxxxxx : yyyyyyyyyy |
977 | xxxxxxxxxxxx : yyyyyyyy |
978 | xxxxxxxxxxxxxx : yyyyyy |
979 | xxxxxxxxxxxxxxx : yyyy |
981 | xxxxxxxxxxxxxxx : |
985 +-----------------+--------------------+
991 \pset format unaligned
997 bc|yyyyyyyyyyyyyyyyyy
1009 xxxxxxxxxxxxxxxxxxxx
1020 \pset format aligned
1026 a yyyyyyyyyyyyyyyyyy
1037 xxxxxxxxxxxxxxxxxxxx
1048 \pset format wrapped
1079 \pset format unaligned
1085 bc|yyyyyyyyyyyyyyyyyy
1097 xxxxxxxxxxxxxxxxxxxx
1108 \pset format aligned
1110 -[ RECORD 1 ]-------------
1114 a | yyyyyyyyyyyyyyyyyy
1116 -[ RECORD 2 ]-------------
1124 : xxxxxxxxxxxxxxxxxx
1125 : xxxxxxxxxxxxxxxxxxxx
1126 a | yyyyyyyyyyyyyyyy
1127 +bc : yyyyyyyyyyyyyy
1136 \pset format wrapped
1138 -[ RECORD 1 ]-------
1144 -[ RECORD 2 ]-------
1169 \pset format unaligned
1175 bc|yyyyyyyyyyyyyyyyyy
1187 xxxxxxxxxxxxxxxxxxxx
1198 \pset format aligned
1200 +-[ RECORD 1 ]--------------+
1204 | a | yyyyyyyyyyyyyyyyyy |
1206 +-[ RECORD 2 ]--------------+
1212 | : xxxxxxxxxxxxxx |
1213 | : xxxxxxxxxxxxxxxx |
1214 | : xxxxxxxxxxxxxxxxxx |
1215 | : xxxxxxxxxxxxxxxxxxxx |
1216 | a | yyyyyyyyyyyyyyyy |
1217 |+bc : yyyyyyyyyyyyyy |
1225 +----+----------------------+
1227 \pset format wrapped
1229 +-[ RECORD 1 ]-----+
1235 +-[ RECORD 2 ]-----+
1262 +----+-------------+
1265 -- test single-line header and data
1266 prepare q as select repeat('x',2*n) as "0123456789abcdef", repeat('y',20-2*n) as "0123456789" from generate_series(1,10) as n;
1267 \pset linestyle ascii
1271 \pset format unaligned
1273 0123456789abcdef|0123456789
1274 xx|yyyyyyyyyyyyyyyyyy
1275 xxxx|yyyyyyyyyyyyyyyy
1276 xxxxxx|yyyyyyyyyyyyyy
1277 xxxxxxxx|yyyyyyyyyyyy
1278 xxxxxxxxxx|yyyyyyyyyy
1279 xxxxxxxxxxxx|yyyyyyyy
1280 xxxxxxxxxxxxxx|yyyyyy
1281 xxxxxxxxxxxxxxxx|yyyy
1282 xxxxxxxxxxxxxxxxxx|yy
1283 xxxxxxxxxxxxxxxxxxxx|
1285 \pset format aligned
1287 0123456789abcdef 0123456789
1288 -------------------- ------------------
1289 xx yyyyyyyyyyyyyyyyyy
1290 xxxx yyyyyyyyyyyyyyyy
1291 xxxxxx yyyyyyyyyyyyyy
1292 xxxxxxxx yyyyyyyyyyyy
1293 xxxxxxxxxx yyyyyyyyyy
1294 xxxxxxxxxxxx yyyyyyyy
1295 xxxxxxxxxxxxxx yyyyyy
1296 xxxxxxxxxxxxxxxx yyyy
1297 xxxxxxxxxxxxxxxxxx yy
1298 xxxxxxxxxxxxxxxxxxxx
1301 \pset format wrapped
1303 0123456789abcdef 0123456789
1304 -------------------- ------------------
1305 xx yyyyyyyyyyyyyyyyyy
1306 xxxx yyyyyyyyyyyyyyyy
1307 xxxxxx yyyyyyyyyyyyyy
1308 xxxxxxxx yyyyyyyyyyyy
1309 xxxxxxxxxx yyyyyyyyyy
1310 xxxxxxxxxxxx yyyyyyyy
1311 xxxxxxxxxxxxxx yyyyyy
1312 xxxxxxxxxxxxxxxx yyyy
1313 xxxxxxxxxxxxxxxxxx yy
1314 xxxxxxxxxxxxxxxxxxxx
1318 \pset format unaligned
1320 0123456789abcdef|0123456789
1321 xx|yyyyyyyyyyyyyyyyyy
1322 xxxx|yyyyyyyyyyyyyyyy
1323 xxxxxx|yyyyyyyyyyyyyy
1324 xxxxxxxx|yyyyyyyyyyyy
1325 xxxxxxxxxx|yyyyyyyyyy
1326 xxxxxxxxxxxx|yyyyyyyy
1327 xxxxxxxxxxxxxx|yyyyyy
1328 xxxxxxxxxxxxxxxx|yyyy
1329 xxxxxxxxxxxxxxxxxx|yy
1330 xxxxxxxxxxxxxxxxxxxx|
1332 \pset format aligned
1334 0123456789abcdef | 0123456789
1335 ----------------------+--------------------
1336 xx | yyyyyyyyyyyyyyyyyy
1337 xxxx | yyyyyyyyyyyyyyyy
1338 xxxxxx | yyyyyyyyyyyyyy
1339 xxxxxxxx | yyyyyyyyyyyy
1340 xxxxxxxxxx | yyyyyyyyyy
1341 xxxxxxxxxxxx | yyyyyyyy
1342 xxxxxxxxxxxxxx | yyyyyy
1343 xxxxxxxxxxxxxxxx | yyyy
1344 xxxxxxxxxxxxxxxxxx | yy
1345 xxxxxxxxxxxxxxxxxxxx |
1348 \pset format wrapped
1350 0123456789abcdef | 0123456789
1351 ---------------------+------------------
1352 xx | yyyyyyyyyyyyyyyy.
1354 xxxx | yyyyyyyyyyyyyyyy
1355 xxxxxx | yyyyyyyyyyyyyy
1356 xxxxxxxx | yyyyyyyyyyyy
1357 xxxxxxxxxx | yyyyyyyyyy
1358 xxxxxxxxxxxx | yyyyyyyy
1359 xxxxxxxxxxxxxx | yyyyyy
1360 xxxxxxxxxxxxxxxx | yyyy
1361 xxxxxxxxxxxxxxxxxx | yy
1362 xxxxxxxxxxxxxxxxxxx.|
1367 \pset format unaligned
1369 0123456789abcdef|0123456789
1370 xx|yyyyyyyyyyyyyyyyyy
1371 xxxx|yyyyyyyyyyyyyyyy
1372 xxxxxx|yyyyyyyyyyyyyy
1373 xxxxxxxx|yyyyyyyyyyyy
1374 xxxxxxxxxx|yyyyyyyyyy
1375 xxxxxxxxxxxx|yyyyyyyy
1376 xxxxxxxxxxxxxx|yyyyyy
1377 xxxxxxxxxxxxxxxx|yyyy
1378 xxxxxxxxxxxxxxxxxx|yy
1379 xxxxxxxxxxxxxxxxxxxx|
1381 \pset format aligned
1383 +----------------------+--------------------+
1384 | 0123456789abcdef | 0123456789 |
1385 +----------------------+--------------------+
1386 | xx | yyyyyyyyyyyyyyyyyy |
1387 | xxxx | yyyyyyyyyyyyyyyy |
1388 | xxxxxx | yyyyyyyyyyyyyy |
1389 | xxxxxxxx | yyyyyyyyyyyy |
1390 | xxxxxxxxxx | yyyyyyyyyy |
1391 | xxxxxxxxxxxx | yyyyyyyy |
1392 | xxxxxxxxxxxxxx | yyyyyy |
1393 | xxxxxxxxxxxxxxxx | yyyy |
1394 | xxxxxxxxxxxxxxxxxx | yy |
1395 | xxxxxxxxxxxxxxxxxxxx | |
1396 +----------------------+--------------------+
1399 \pset format wrapped
1401 +--------------------+-----------------+
1402 | 0123456789abcdef | 0123456789 |
1403 +--------------------+-----------------+
1404 | xx | yyyyyyyyyyyyyyy.|
1406 | xxxx | yyyyyyyyyyyyyyy.|
1408 | xxxxxx | yyyyyyyyyyyyyy |
1409 | xxxxxxxx | yyyyyyyyyyyy |
1410 | xxxxxxxxxx | yyyyyyyyyy |
1411 | xxxxxxxxxxxx | yyyyyyyy |
1412 | xxxxxxxxxxxxxx | yyyyyy |
1413 | xxxxxxxxxxxxxxxx | yyyy |
1414 | xxxxxxxxxxxxxxxxxx | yy |
1415 | xxxxxxxxxxxxxxxxxx.| |
1417 +--------------------+-----------------+
1423 \pset format unaligned
1426 0123456789|yyyyyyyyyyyyyyyyyy
1428 0123456789abcdef|xxxx
1429 0123456789|yyyyyyyyyyyyyyyy
1431 0123456789abcdef|xxxxxx
1432 0123456789|yyyyyyyyyyyyyy
1434 0123456789abcdef|xxxxxxxx
1435 0123456789|yyyyyyyyyyyy
1437 0123456789abcdef|xxxxxxxxxx
1438 0123456789|yyyyyyyyyy
1440 0123456789abcdef|xxxxxxxxxxxx
1443 0123456789abcdef|xxxxxxxxxxxxxx
1446 0123456789abcdef|xxxxxxxxxxxxxxxx
1449 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1452 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1454 \pset format aligned
1458 0123456789 yyyyyyyyyyyyyyyyyy
1460 0123456789abcdef xxxx
1461 0123456789 yyyyyyyyyyyyyyyy
1463 0123456789abcdef xxxxxx
1464 0123456789 yyyyyyyyyyyyyy
1466 0123456789abcdef xxxxxxxx
1467 0123456789 yyyyyyyyyyyy
1469 0123456789abcdef xxxxxxxxxx
1470 0123456789 yyyyyyyyyy
1472 0123456789abcdef xxxxxxxxxxxx
1475 0123456789abcdef xxxxxxxxxxxxxx
1478 0123456789abcdef xxxxxxxxxxxxxxxx
1481 0123456789abcdef xxxxxxxxxxxxxxxxxx
1484 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
1487 \pset format wrapped
1491 0123456789 yyyyyyyyyyyy.
1494 0123456789abcdef xxxx
1495 0123456789 yyyyyyyyyyyy.
1498 0123456789abcdef xxxxxx
1499 0123456789 yyyyyyyyyyyy.
1502 0123456789abcdef xxxxxxxx
1503 0123456789 yyyyyyyyyyyy
1505 0123456789abcdef xxxxxxxxxx
1506 0123456789 yyyyyyyyyy
1508 0123456789abcdef xxxxxxxxxxxx
1511 0123456789abcdef xxxxxxxxxxxx.
1515 0123456789abcdef xxxxxxxxxxxx.
1519 0123456789abcdef xxxxxxxxxxxx.
1523 0123456789abcdef xxxxxxxxxxxx.
1528 \pset format unaligned
1531 0123456789|yyyyyyyyyyyyyyyyyy
1533 0123456789abcdef|xxxx
1534 0123456789|yyyyyyyyyyyyyyyy
1536 0123456789abcdef|xxxxxx
1537 0123456789|yyyyyyyyyyyyyy
1539 0123456789abcdef|xxxxxxxx
1540 0123456789|yyyyyyyyyyyy
1542 0123456789abcdef|xxxxxxxxxx
1543 0123456789|yyyyyyyyyy
1545 0123456789abcdef|xxxxxxxxxxxx
1548 0123456789abcdef|xxxxxxxxxxxxxx
1551 0123456789abcdef|xxxxxxxxxxxxxxxx
1554 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1557 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1559 \pset format aligned
1561 -[ RECORD 1 ]----+---------------------
1562 0123456789abcdef | xx
1563 0123456789 | yyyyyyyyyyyyyyyyyy
1564 -[ RECORD 2 ]----+---------------------
1565 0123456789abcdef | xxxx
1566 0123456789 | yyyyyyyyyyyyyyyy
1567 -[ RECORD 3 ]----+---------------------
1568 0123456789abcdef | xxxxxx
1569 0123456789 | yyyyyyyyyyyyyy
1570 -[ RECORD 4 ]----+---------------------
1571 0123456789abcdef | xxxxxxxx
1572 0123456789 | yyyyyyyyyyyy
1573 -[ RECORD 5 ]----+---------------------
1574 0123456789abcdef | xxxxxxxxxx
1575 0123456789 | yyyyyyyyyy
1576 -[ RECORD 6 ]----+---------------------
1577 0123456789abcdef | xxxxxxxxxxxx
1578 0123456789 | yyyyyyyy
1579 -[ RECORD 7 ]----+---------------------
1580 0123456789abcdef | xxxxxxxxxxxxxx
1582 -[ RECORD 8 ]----+---------------------
1583 0123456789abcdef | xxxxxxxxxxxxxxxx
1585 -[ RECORD 9 ]----+---------------------
1586 0123456789abcdef | xxxxxxxxxxxxxxxxxx
1588 -[ RECORD 10 ]---+---------------------
1589 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
1592 \pset format wrapped
1594 -[ RECORD 1 ]----+-----------
1595 0123456789abcdef | xx
1596 0123456789 | yyyyyyyyyy.
1598 -[ RECORD 2 ]----+-----------
1599 0123456789abcdef | xxxx
1600 0123456789 | yyyyyyyyyy.
1602 -[ RECORD 3 ]----+-----------
1603 0123456789abcdef | xxxxxx
1604 0123456789 | yyyyyyyyyy.
1606 -[ RECORD 4 ]----+-----------
1607 0123456789abcdef | xxxxxxxx
1608 0123456789 | yyyyyyyyyy.
1610 -[ RECORD 5 ]----+-----------
1611 0123456789abcdef | xxxxxxxxxx
1612 0123456789 | yyyyyyyyyy
1613 -[ RECORD 6 ]----+-----------
1614 0123456789abcdef | xxxxxxxxxx.
1616 0123456789 | yyyyyyyy
1617 -[ RECORD 7 ]----+-----------
1618 0123456789abcdef | xxxxxxxxxx.
1621 -[ RECORD 8 ]----+-----------
1622 0123456789abcdef | xxxxxxxxxx.
1625 -[ RECORD 9 ]----+-----------
1626 0123456789abcdef | xxxxxxxxxx.
1629 -[ RECORD 10 ]---+-----------
1630 0123456789abcdef | xxxxxxxxxx.
1635 \pset format unaligned
1638 0123456789|yyyyyyyyyyyyyyyyyy
1640 0123456789abcdef|xxxx
1641 0123456789|yyyyyyyyyyyyyyyy
1643 0123456789abcdef|xxxxxx
1644 0123456789|yyyyyyyyyyyyyy
1646 0123456789abcdef|xxxxxxxx
1647 0123456789|yyyyyyyyyyyy
1649 0123456789abcdef|xxxxxxxxxx
1650 0123456789|yyyyyyyyyy
1652 0123456789abcdef|xxxxxxxxxxxx
1655 0123456789abcdef|xxxxxxxxxxxxxx
1658 0123456789abcdef|xxxxxxxxxxxxxxxx
1661 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1664 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1666 \pset format aligned
1668 +-[ RECORD 1 ]-----+----------------------+
1669 | 0123456789abcdef | xx |
1670 | 0123456789 | yyyyyyyyyyyyyyyyyy |
1671 +-[ RECORD 2 ]-----+----------------------+
1672 | 0123456789abcdef | xxxx |
1673 | 0123456789 | yyyyyyyyyyyyyyyy |
1674 +-[ RECORD 3 ]-----+----------------------+
1675 | 0123456789abcdef | xxxxxx |
1676 | 0123456789 | yyyyyyyyyyyyyy |
1677 +-[ RECORD 4 ]-----+----------------------+
1678 | 0123456789abcdef | xxxxxxxx |
1679 | 0123456789 | yyyyyyyyyyyy |
1680 +-[ RECORD 5 ]-----+----------------------+
1681 | 0123456789abcdef | xxxxxxxxxx |
1682 | 0123456789 | yyyyyyyyyy |
1683 +-[ RECORD 6 ]-----+----------------------+
1684 | 0123456789abcdef | xxxxxxxxxxxx |
1685 | 0123456789 | yyyyyyyy |
1686 +-[ RECORD 7 ]-----+----------------------+
1687 | 0123456789abcdef | xxxxxxxxxxxxxx |
1688 | 0123456789 | yyyyyy |
1689 +-[ RECORD 8 ]-----+----------------------+
1690 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
1691 | 0123456789 | yyyy |
1692 +-[ RECORD 9 ]-----+----------------------+
1693 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
1695 +-[ RECORD 10 ]----+----------------------+
1696 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
1698 +------------------+----------------------+
1700 \pset format wrapped
1702 +-[ RECORD 1 ]-----+---------+
1703 | 0123456789abcdef | xx |
1704 | 0123456789 | yyyyyyy.|
1707 +-[ RECORD 2 ]-----+---------+
1708 | 0123456789abcdef | xxxx |
1709 | 0123456789 | yyyyyyy.|
1712 +-[ RECORD 3 ]-----+---------+
1713 | 0123456789abcdef | xxxxxx |
1714 | 0123456789 | yyyyyyy.|
1716 +-[ RECORD 4 ]-----+---------+
1717 | 0123456789abcdef | xxxxxxx.|
1719 | 0123456789 | yyyyyyy.|
1721 +-[ RECORD 5 ]-----+---------+
1722 | 0123456789abcdef | xxxxxxx.|
1724 | 0123456789 | yyyyyyy.|
1726 +-[ RECORD 6 ]-----+---------+
1727 | 0123456789abcdef | xxxxxxx.|
1729 | 0123456789 | yyyyyyy.|
1731 +-[ RECORD 7 ]-----+---------+
1732 | 0123456789abcdef | xxxxxxx.|
1734 | 0123456789 | yyyyyy |
1735 +-[ RECORD 8 ]-----+---------+
1736 | 0123456789abcdef | xxxxxxx.|
1739 | 0123456789 | yyyy |
1740 +-[ RECORD 9 ]-----+---------+
1741 | 0123456789abcdef | xxxxxxx.|
1745 +-[ RECORD 10 ]----+---------+
1746 | 0123456789abcdef | xxxxxxx.|
1750 +------------------+---------+
1755 \pset format unaligned
1758 0123456789|yyyyyyyyyyyyyyyyyy
1760 0123456789abcdef|xxxx
1761 0123456789|yyyyyyyyyyyyyyyy
1763 0123456789abcdef|xxxxxx
1764 0123456789|yyyyyyyyyyyyyy
1766 0123456789abcdef|xxxxxxxx
1767 0123456789|yyyyyyyyyyyy
1769 0123456789abcdef|xxxxxxxxxx
1770 0123456789|yyyyyyyyyy
1772 0123456789abcdef|xxxxxxxxxxxx
1775 0123456789abcdef|xxxxxxxxxxxxxx
1778 0123456789abcdef|xxxxxxxxxxxxxxxx
1781 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1784 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1786 \pset format aligned
1790 0123456789 yyyyyyyyyyyyyyyyyy
1792 0123456789abcdef xxxx
1793 0123456789 yyyyyyyyyyyyyyyy
1795 0123456789abcdef xxxxxx
1796 0123456789 yyyyyyyyyyyyyy
1798 0123456789abcdef xxxxxxxx
1799 0123456789 yyyyyyyyyyyy
1801 0123456789abcdef xxxxxxxxxx
1802 0123456789 yyyyyyyyyy
1804 0123456789abcdef xxxxxxxxxxxx
1807 0123456789abcdef xxxxxxxxxxxxxx
1810 0123456789abcdef xxxxxxxxxxxxxxxx
1813 0123456789abcdef xxxxxxxxxxxxxxxxxx
1816 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
1819 \pset format wrapped
1830 0123456789abcdef xxx.
1839 0123456789abcdef xxx.
1847 0123456789abcdef xxx.
1855 0123456789abcdef xxx.
1864 0123456789abcdef xxx.
1872 0123456789abcdef xxx.
1880 0123456789abcdef xxx.
1889 0123456789abcdef xxx.
1897 0123456789abcdef xxx.
1907 \pset format unaligned
1910 0123456789|yyyyyyyyyyyyyyyyyy
1912 0123456789abcdef|xxxx
1913 0123456789|yyyyyyyyyyyyyyyy
1915 0123456789abcdef|xxxxxx
1916 0123456789|yyyyyyyyyyyyyy
1918 0123456789abcdef|xxxxxxxx
1919 0123456789|yyyyyyyyyyyy
1921 0123456789abcdef|xxxxxxxxxx
1922 0123456789|yyyyyyyyyy
1924 0123456789abcdef|xxxxxxxxxxxx
1927 0123456789abcdef|xxxxxxxxxxxxxx
1930 0123456789abcdef|xxxxxxxxxxxxxxxx
1933 0123456789abcdef|xxxxxxxxxxxxxxxxxx
1936 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
1938 \pset format aligned
1940 -[ RECORD 1 ]----+---------------------
1941 0123456789abcdef | xx
1942 0123456789 | yyyyyyyyyyyyyyyyyy
1943 -[ RECORD 2 ]----+---------------------
1944 0123456789abcdef | xxxx
1945 0123456789 | yyyyyyyyyyyyyyyy
1946 -[ RECORD 3 ]----+---------------------
1947 0123456789abcdef | xxxxxx
1948 0123456789 | yyyyyyyyyyyyyy
1949 -[ RECORD 4 ]----+---------------------
1950 0123456789abcdef | xxxxxxxx
1951 0123456789 | yyyyyyyyyyyy
1952 -[ RECORD 5 ]----+---------------------
1953 0123456789abcdef | xxxxxxxxxx
1954 0123456789 | yyyyyyyyyy
1955 -[ RECORD 6 ]----+---------------------
1956 0123456789abcdef | xxxxxxxxxxxx
1957 0123456789 | yyyyyyyy
1958 -[ RECORD 7 ]----+---------------------
1959 0123456789abcdef | xxxxxxxxxxxxxx
1961 -[ RECORD 8 ]----+---------------------
1962 0123456789abcdef | xxxxxxxxxxxxxxxx
1964 -[ RECORD 9 ]----+---------------------
1965 0123456789abcdef | xxxxxxxxxxxxxxxxxx
1967 -[ RECORD 10 ]---+---------------------
1968 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
1971 \pset format wrapped
1973 -[ RECORD 1 ]----+----
1974 0123456789abcdef | xx
1981 -[ RECORD 2 ]----+----
1982 0123456789abcdef | xxx.
1990 -[ RECORD 3 ]----+----
1991 0123456789abcdef | xxx.
1998 -[ RECORD 4 ]----+----
1999 0123456789abcdef | xxx.
2006 -[ RECORD 5 ]----+----
2007 0123456789abcdef | xxx.
2015 -[ RECORD 6 ]----+----
2016 0123456789abcdef | xxx.
2023 -[ RECORD 7 ]----+----
2024 0123456789abcdef | xxx.
2031 -[ RECORD 8 ]----+----
2032 0123456789abcdef | xxx.
2040 -[ RECORD 9 ]----+----
2041 0123456789abcdef | xxx.
2048 -[ RECORD 10 ]---+----
2049 0123456789abcdef | xxx.
2059 \pset format unaligned
2062 0123456789|yyyyyyyyyyyyyyyyyy
2064 0123456789abcdef|xxxx
2065 0123456789|yyyyyyyyyyyyyyyy
2067 0123456789abcdef|xxxxxx
2068 0123456789|yyyyyyyyyyyyyy
2070 0123456789abcdef|xxxxxxxx
2071 0123456789|yyyyyyyyyyyy
2073 0123456789abcdef|xxxxxxxxxx
2074 0123456789|yyyyyyyyyy
2076 0123456789abcdef|xxxxxxxxxxxx
2079 0123456789abcdef|xxxxxxxxxxxxxx
2082 0123456789abcdef|xxxxxxxxxxxxxxxx
2085 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2088 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2090 \pset format aligned
2092 +-[ RECORD 1 ]-----+----------------------+
2093 | 0123456789abcdef | xx |
2094 | 0123456789 | yyyyyyyyyyyyyyyyyy |
2095 +-[ RECORD 2 ]-----+----------------------+
2096 | 0123456789abcdef | xxxx |
2097 | 0123456789 | yyyyyyyyyyyyyyyy |
2098 +-[ RECORD 3 ]-----+----------------------+
2099 | 0123456789abcdef | xxxxxx |
2100 | 0123456789 | yyyyyyyyyyyyyy |
2101 +-[ RECORD 4 ]-----+----------------------+
2102 | 0123456789abcdef | xxxxxxxx |
2103 | 0123456789 | yyyyyyyyyyyy |
2104 +-[ RECORD 5 ]-----+----------------------+
2105 | 0123456789abcdef | xxxxxxxxxx |
2106 | 0123456789 | yyyyyyyyyy |
2107 +-[ RECORD 6 ]-----+----------------------+
2108 | 0123456789abcdef | xxxxxxxxxxxx |
2109 | 0123456789 | yyyyyyyy |
2110 +-[ RECORD 7 ]-----+----------------------+
2111 | 0123456789abcdef | xxxxxxxxxxxxxx |
2112 | 0123456789 | yyyyyy |
2113 +-[ RECORD 8 ]-----+----------------------+
2114 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
2115 | 0123456789 | yyyy |
2116 +-[ RECORD 9 ]-----+----------------------+
2117 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
2119 +-[ RECORD 10 ]----+----------------------+
2120 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
2122 +------------------+----------------------+
2124 \pset format wrapped
2126 +-[ RECORD 1 ]-----+-----+
2127 | 0123456789abcdef | xx |
2128 | 0123456789 | yyy.|
2134 +-[ RECORD 2 ]-----+-----+
2135 | 0123456789abcdef | xxx.|
2137 | 0123456789 | yyy.|
2143 +-[ RECORD 3 ]-----+-----+
2144 | 0123456789abcdef | xxx.|
2146 | 0123456789 | yyy.|
2151 +-[ RECORD 4 ]-----+-----+
2152 | 0123456789abcdef | xxx.|
2155 | 0123456789 | yyy.|
2159 +-[ RECORD 5 ]-----+-----+
2160 | 0123456789abcdef | xxx.|
2164 | 0123456789 | yyy.|
2168 +-[ RECORD 6 ]-----+-----+
2169 | 0123456789abcdef | xxx.|
2173 | 0123456789 | yyy.|
2176 +-[ RECORD 7 ]-----+-----+
2177 | 0123456789abcdef | xxx.|
2182 | 0123456789 | yyy.|
2184 +-[ RECORD 8 ]-----+-----+
2185 | 0123456789abcdef | xxx.|
2191 | 0123456789 | yyy.|
2193 +-[ RECORD 9 ]-----+-----+
2194 | 0123456789abcdef | xxx.|
2201 +-[ RECORD 10 ]----+-----+
2202 | 0123456789abcdef | xxx.|
2210 +------------------+-----+
2212 \pset linestyle old-ascii
2216 \pset format unaligned
2218 0123456789abcdef|0123456789
2219 xx|yyyyyyyyyyyyyyyyyy
2220 xxxx|yyyyyyyyyyyyyyyy
2221 xxxxxx|yyyyyyyyyyyyyy
2222 xxxxxxxx|yyyyyyyyyyyy
2223 xxxxxxxxxx|yyyyyyyyyy
2224 xxxxxxxxxxxx|yyyyyyyy
2225 xxxxxxxxxxxxxx|yyyyyy
2226 xxxxxxxxxxxxxxxx|yyyy
2227 xxxxxxxxxxxxxxxxxx|yy
2228 xxxxxxxxxxxxxxxxxxxx|
2230 \pset format aligned
2232 0123456789abcdef 0123456789
2233 -------------------- ------------------
2234 xx yyyyyyyyyyyyyyyyyy
2235 xxxx yyyyyyyyyyyyyyyy
2236 xxxxxx yyyyyyyyyyyyyy
2237 xxxxxxxx yyyyyyyyyyyy
2238 xxxxxxxxxx yyyyyyyyyy
2239 xxxxxxxxxxxx yyyyyyyy
2240 xxxxxxxxxxxxxx yyyyyy
2241 xxxxxxxxxxxxxxxx yyyy
2242 xxxxxxxxxxxxxxxxxx yy
2243 xxxxxxxxxxxxxxxxxxxx
2246 \pset format wrapped
2248 0123456789abcdef 0123456789
2249 -------------------- ------------------
2250 xx yyyyyyyyyyyyyyyyyy
2251 xxxx yyyyyyyyyyyyyyyy
2252 xxxxxx yyyyyyyyyyyyyy
2253 xxxxxxxx yyyyyyyyyyyy
2254 xxxxxxxxxx yyyyyyyyyy
2255 xxxxxxxxxxxx yyyyyyyy
2256 xxxxxxxxxxxxxx yyyyyy
2257 xxxxxxxxxxxxxxxx yyyy
2258 xxxxxxxxxxxxxxxxxx yy
2259 xxxxxxxxxxxxxxxxxxxx
2263 \pset format unaligned
2265 0123456789abcdef|0123456789
2266 xx|yyyyyyyyyyyyyyyyyy
2267 xxxx|yyyyyyyyyyyyyyyy
2268 xxxxxx|yyyyyyyyyyyyyy
2269 xxxxxxxx|yyyyyyyyyyyy
2270 xxxxxxxxxx|yyyyyyyyyy
2271 xxxxxxxxxxxx|yyyyyyyy
2272 xxxxxxxxxxxxxx|yyyyyy
2273 xxxxxxxxxxxxxxxx|yyyy
2274 xxxxxxxxxxxxxxxxxx|yy
2275 xxxxxxxxxxxxxxxxxxxx|
2277 \pset format aligned
2279 0123456789abcdef | 0123456789
2280 ----------------------+--------------------
2281 xx | yyyyyyyyyyyyyyyyyy
2282 xxxx | yyyyyyyyyyyyyyyy
2283 xxxxxx | yyyyyyyyyyyyyy
2284 xxxxxxxx | yyyyyyyyyyyy
2285 xxxxxxxxxx | yyyyyyyyyy
2286 xxxxxxxxxxxx | yyyyyyyy
2287 xxxxxxxxxxxxxx | yyyyyy
2288 xxxxxxxxxxxxxxxx | yyyy
2289 xxxxxxxxxxxxxxxxxx | yy
2290 xxxxxxxxxxxxxxxxxxxx |
2293 \pset format wrapped
2295 0123456789abcdef | 0123456789
2296 ---------------------+------------------
2297 xx | yyyyyyyyyyyyyyyy
2299 xxxx | yyyyyyyyyyyyyyyy
2300 xxxxxx | yyyyyyyyyyyyyy
2301 xxxxxxxx | yyyyyyyyyyyy
2302 xxxxxxxxxx | yyyyyyyyyy
2303 xxxxxxxxxxxx | yyyyyyyy
2304 xxxxxxxxxxxxxx | yyyyyy
2305 xxxxxxxxxxxxxxxx | yyyy
2306 xxxxxxxxxxxxxxxxxx | yy
2307 xxxxxxxxxxxxxxxxxxx |
2312 \pset format unaligned
2314 0123456789abcdef|0123456789
2315 xx|yyyyyyyyyyyyyyyyyy
2316 xxxx|yyyyyyyyyyyyyyyy
2317 xxxxxx|yyyyyyyyyyyyyy
2318 xxxxxxxx|yyyyyyyyyyyy
2319 xxxxxxxxxx|yyyyyyyyyy
2320 xxxxxxxxxxxx|yyyyyyyy
2321 xxxxxxxxxxxxxx|yyyyyy
2322 xxxxxxxxxxxxxxxx|yyyy
2323 xxxxxxxxxxxxxxxxxx|yy
2324 xxxxxxxxxxxxxxxxxxxx|
2326 \pset format aligned
2328 +----------------------+--------------------+
2329 | 0123456789abcdef | 0123456789 |
2330 +----------------------+--------------------+
2331 | xx | yyyyyyyyyyyyyyyyyy |
2332 | xxxx | yyyyyyyyyyyyyyyy |
2333 | xxxxxx | yyyyyyyyyyyyyy |
2334 | xxxxxxxx | yyyyyyyyyyyy |
2335 | xxxxxxxxxx | yyyyyyyyyy |
2336 | xxxxxxxxxxxx | yyyyyyyy |
2337 | xxxxxxxxxxxxxx | yyyyyy |
2338 | xxxxxxxxxxxxxxxx | yyyy |
2339 | xxxxxxxxxxxxxxxxxx | yy |
2340 | xxxxxxxxxxxxxxxxxxxx | |
2341 +----------------------+--------------------+
2344 \pset format wrapped
2346 +--------------------+-----------------+
2347 | 0123456789abcdef | 0123456789 |
2348 +--------------------+-----------------+
2349 | xx | yyyyyyyyyyyyyyy |
2351 | xxxx | yyyyyyyyyyyyyyy |
2353 | xxxxxx | yyyyyyyyyyyyyy |
2354 | xxxxxxxx | yyyyyyyyyyyy |
2355 | xxxxxxxxxx | yyyyyyyyyy |
2356 | xxxxxxxxxxxx | yyyyyyyy |
2357 | xxxxxxxxxxxxxx | yyyyyy |
2358 | xxxxxxxxxxxxxxxx | yyyy |
2359 | xxxxxxxxxxxxxxxxxx | yy |
2360 | xxxxxxxxxxxxxxxxxx | |
2362 +--------------------+-----------------+
2367 \pset format unaligned
2370 0123456789|yyyyyyyyyyyyyyyyyy
2372 0123456789abcdef|xxxx
2373 0123456789|yyyyyyyyyyyyyyyy
2375 0123456789abcdef|xxxxxx
2376 0123456789|yyyyyyyyyyyyyy
2378 0123456789abcdef|xxxxxxxx
2379 0123456789|yyyyyyyyyyyy
2381 0123456789abcdef|xxxxxxxxxx
2382 0123456789|yyyyyyyyyy
2384 0123456789abcdef|xxxxxxxxxxxx
2387 0123456789abcdef|xxxxxxxxxxxxxx
2390 0123456789abcdef|xxxxxxxxxxxxxxxx
2393 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2396 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2398 \pset format aligned
2402 0123456789 yyyyyyyyyyyyyyyyyy
2404 0123456789abcdef xxxx
2405 0123456789 yyyyyyyyyyyyyyyy
2407 0123456789abcdef xxxxxx
2408 0123456789 yyyyyyyyyyyyyy
2410 0123456789abcdef xxxxxxxx
2411 0123456789 yyyyyyyyyyyy
2413 0123456789abcdef xxxxxxxxxx
2414 0123456789 yyyyyyyyyy
2416 0123456789abcdef xxxxxxxxxxxx
2419 0123456789abcdef xxxxxxxxxxxxxx
2422 0123456789abcdef xxxxxxxxxxxxxxxx
2425 0123456789abcdef xxxxxxxxxxxxxxxxxx
2428 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
2431 \pset format wrapped
2435 0123456789 yyyyyyyyyyyyyyyyyy
2437 0123456789abcdef xxxx
2438 0123456789 yyyyyyyyyyyyyyyy
2440 0123456789abcdef xxxxxx
2441 0123456789 yyyyyyyyyyyyyy
2443 0123456789abcdef xxxxxxxx
2444 0123456789 yyyyyyyyyyyy
2446 0123456789abcdef xxxxxxxxxx
2447 0123456789 yyyyyyyyyy
2449 0123456789abcdef xxxxxxxxxxxx
2452 0123456789abcdef xxxxxxxxxxxxxx
2455 0123456789abcdef xxxxxxxxxxxxxxxx
2458 0123456789abcdef xxxxxxxxxxxxxxxxxx
2461 0123456789abcdef xxxxxxxxxxxxxxxxxxxx
2465 \pset format unaligned
2468 0123456789|yyyyyyyyyyyyyyyyyy
2470 0123456789abcdef|xxxx
2471 0123456789|yyyyyyyyyyyyyyyy
2473 0123456789abcdef|xxxxxx
2474 0123456789|yyyyyyyyyyyyyy
2476 0123456789abcdef|xxxxxxxx
2477 0123456789|yyyyyyyyyyyy
2479 0123456789abcdef|xxxxxxxxxx
2480 0123456789|yyyyyyyyyy
2482 0123456789abcdef|xxxxxxxxxxxx
2485 0123456789abcdef|xxxxxxxxxxxxxx
2488 0123456789abcdef|xxxxxxxxxxxxxxxx
2491 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2494 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2496 \pset format aligned
2498 -[ RECORD 1 ]----+---------------------
2499 0123456789abcdef | xx
2500 0123456789 | yyyyyyyyyyyyyyyyyy
2501 -[ RECORD 2 ]----+---------------------
2502 0123456789abcdef | xxxx
2503 0123456789 | yyyyyyyyyyyyyyyy
2504 -[ RECORD 3 ]----+---------------------
2505 0123456789abcdef | xxxxxx
2506 0123456789 | yyyyyyyyyyyyyy
2507 -[ RECORD 4 ]----+---------------------
2508 0123456789abcdef | xxxxxxxx
2509 0123456789 | yyyyyyyyyyyy
2510 -[ RECORD 5 ]----+---------------------
2511 0123456789abcdef | xxxxxxxxxx
2512 0123456789 | yyyyyyyyyy
2513 -[ RECORD 6 ]----+---------------------
2514 0123456789abcdef | xxxxxxxxxxxx
2515 0123456789 | yyyyyyyy
2516 -[ RECORD 7 ]----+---------------------
2517 0123456789abcdef | xxxxxxxxxxxxxx
2519 -[ RECORD 8 ]----+---------------------
2520 0123456789abcdef | xxxxxxxxxxxxxxxx
2522 -[ RECORD 9 ]----+---------------------
2523 0123456789abcdef | xxxxxxxxxxxxxxxxxx
2525 -[ RECORD 10 ]---+---------------------
2526 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
2529 \pset format wrapped
2531 -[ RECORD 1 ]----+---------------------
2532 0123456789abcdef | xx
2533 0123456789 | yyyyyyyyyyyyyyyyyy
2534 -[ RECORD 2 ]----+---------------------
2535 0123456789abcdef | xxxx
2536 0123456789 | yyyyyyyyyyyyyyyy
2537 -[ RECORD 3 ]----+---------------------
2538 0123456789abcdef | xxxxxx
2539 0123456789 | yyyyyyyyyyyyyy
2540 -[ RECORD 4 ]----+---------------------
2541 0123456789abcdef | xxxxxxxx
2542 0123456789 | yyyyyyyyyyyy
2543 -[ RECORD 5 ]----+---------------------
2544 0123456789abcdef | xxxxxxxxxx
2545 0123456789 | yyyyyyyyyy
2546 -[ RECORD 6 ]----+---------------------
2547 0123456789abcdef | xxxxxxxxxxxx
2548 0123456789 | yyyyyyyy
2549 -[ RECORD 7 ]----+---------------------
2550 0123456789abcdef | xxxxxxxxxxxxxx
2552 -[ RECORD 8 ]----+---------------------
2553 0123456789abcdef | xxxxxxxxxxxxxxxx
2555 -[ RECORD 9 ]----+---------------------
2556 0123456789abcdef | xxxxxxxxxxxxxxxxxx
2558 -[ RECORD 10 ]---+---------------------
2559 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
2563 \pset format unaligned
2566 0123456789|yyyyyyyyyyyyyyyyyy
2568 0123456789abcdef|xxxx
2569 0123456789|yyyyyyyyyyyyyyyy
2571 0123456789abcdef|xxxxxx
2572 0123456789|yyyyyyyyyyyyyy
2574 0123456789abcdef|xxxxxxxx
2575 0123456789|yyyyyyyyyyyy
2577 0123456789abcdef|xxxxxxxxxx
2578 0123456789|yyyyyyyyyy
2580 0123456789abcdef|xxxxxxxxxxxx
2583 0123456789abcdef|xxxxxxxxxxxxxx
2586 0123456789abcdef|xxxxxxxxxxxxxxxx
2589 0123456789abcdef|xxxxxxxxxxxxxxxxxx
2592 0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
2594 \pset format aligned
2596 +-[ RECORD 1 ]-----+----------------------+
2597 | 0123456789abcdef | xx |
2598 | 0123456789 | yyyyyyyyyyyyyyyyyy |
2599 +-[ RECORD 2 ]-----+----------------------+
2600 | 0123456789abcdef | xxxx |
2601 | 0123456789 | yyyyyyyyyyyyyyyy |
2602 +-[ RECORD 3 ]-----+----------------------+
2603 | 0123456789abcdef | xxxxxx |
2604 | 0123456789 | yyyyyyyyyyyyyy |
2605 +-[ RECORD 4 ]-----+----------------------+
2606 | 0123456789abcdef | xxxxxxxx |
2607 | 0123456789 | yyyyyyyyyyyy |
2608 +-[ RECORD 5 ]-----+----------------------+
2609 | 0123456789abcdef | xxxxxxxxxx |
2610 | 0123456789 | yyyyyyyyyy |
2611 +-[ RECORD 6 ]-----+----------------------+
2612 | 0123456789abcdef | xxxxxxxxxxxx |
2613 | 0123456789 | yyyyyyyy |
2614 +-[ RECORD 7 ]-----+----------------------+
2615 | 0123456789abcdef | xxxxxxxxxxxxxx |
2616 | 0123456789 | yyyyyy |
2617 +-[ RECORD 8 ]-----+----------------------+
2618 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
2619 | 0123456789 | yyyy |
2620 +-[ RECORD 9 ]-----+----------------------+
2621 | 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
2623 +-[ RECORD 10 ]----+----------------------+
2624 | 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
2626 +------------------+----------------------+
2628 \pset format wrapped
2630 +-[ RECORD 1 ]-----+-------------------+
2631 | 0123456789abcdef | xx |
2632 | 0123456789 | yyyyyyyyyyyyyyyyy |
2634 +-[ RECORD 2 ]-----+-------------------+
2635 | 0123456789abcdef | xxxx |
2636 | 0123456789 | yyyyyyyyyyyyyyyy |
2637 +-[ RECORD 3 ]-----+-------------------+
2638 | 0123456789abcdef | xxxxxx |
2639 | 0123456789 | yyyyyyyyyyyyyy |
2640 +-[ RECORD 4 ]-----+-------------------+
2641 | 0123456789abcdef | xxxxxxxx |
2642 | 0123456789 | yyyyyyyyyyyy |
2643 +-[ RECORD 5 ]-----+-------------------+
2644 | 0123456789abcdef | xxxxxxxxxx |
2645 | 0123456789 | yyyyyyyyyy |
2646 +-[ RECORD 6 ]-----+-------------------+
2647 | 0123456789abcdef | xxxxxxxxxxxx |
2648 | 0123456789 | yyyyyyyy |
2649 +-[ RECORD 7 ]-----+-------------------+
2650 | 0123456789abcdef | xxxxxxxxxxxxxx |
2651 | 0123456789 | yyyyyy |
2652 +-[ RECORD 8 ]-----+-------------------+
2653 | 0123456789abcdef | xxxxxxxxxxxxxxxx |
2654 | 0123456789 | yyyy |
2655 +-[ RECORD 9 ]-----+-------------------+
2656 | 0123456789abcdef | xxxxxxxxxxxxxxxxx |
2659 +-[ RECORD 10 ]----+-------------------+
2660 | 0123456789abcdef | xxxxxxxxxxxxxxxxx |
2663 +------------------+-------------------+
2666 \pset linestyle ascii
2668 -- support table for output-format tests (useful to create a footer)
2669 create table psql_serial_tab (id serial);
2670 -- test header/footer/tuples_only behavior in aligned/unaligned/wrapped cases
2671 \pset format aligned
2673 \d psql_serial_tab_id_seq
2674 Sequence "public.psql_serial_tab_id_seq"
2675 Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
2676 ---------+-------+---------+------------+-----------+---------+-------
2677 integer | 1 | 1 | 2147483647 | 1 | no | 1
2678 Owned by: public.psql_serial_tab.id
2680 \pset tuples_only true
2682 pg_catalog | exp | double precision | double precision | func
2683 pg_catalog | exp | numeric | numeric | func
2685 \pset tuples_only false
2687 \d psql_serial_tab_id_seq
2688 Sequence "public.psql_serial_tab_id_seq"
2689 -[ RECORD 1 ]---------
2693 Maximum | 2147483647
2698 Owned by: public.psql_serial_tab.id
2700 \pset tuples_only true
2704 Result data type | double precision
2705 Argument data types | double precision
2707 --------------------+-----------------
2710 Result data type | numeric
2711 Argument data types | numeric
2714 \pset tuples_only false
2715 -- empty table is a special case for this format
2716 select 1 where false;
2719 \pset format unaligned
2721 \d psql_serial_tab_id_seq
2722 Sequence "public.psql_serial_tab_id_seq"
2723 Type|Start|Minimum|Maximum|Increment|Cycles?|Cache
2724 integer|1|1|2147483647|1|no|1
2725 Owned by: public.psql_serial_tab.id
2726 \pset tuples_only true
2728 pg_catalog|exp|double precision|double precision|func
2729 pg_catalog|exp|numeric|numeric|func
2730 \pset tuples_only false
2732 \d psql_serial_tab_id_seq
2733 Sequence "public.psql_serial_tab_id_seq"
2743 Owned by: public.psql_serial_tab.id
2744 \pset tuples_only true
2748 Result data type|double precision
2749 Argument data types|double precision
2754 Result data type|numeric
2755 Argument data types|numeric
2757 \pset tuples_only false
2758 \pset format wrapped
2760 \d psql_serial_tab_id_seq
2761 Sequence "public.psql_serial_tab_id_seq"
2762 Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
2763 ---------+-------+---------+------------+-----------+---------+-------
2764 integer | 1 | 1 | 2147483647 | 1 | no | 1
2765 Owned by: public.psql_serial_tab.id
2767 \pset tuples_only true
2769 pg_catalog | exp | double precision | double precision | func
2770 pg_catalog | exp | numeric | numeric | func
2772 \pset tuples_only false
2774 \d psql_serial_tab_id_seq
2775 Sequence "public.psql_serial_tab_id_seq"
2776 -[ RECORD 1 ]---------
2780 Maximum | 2147483647
2785 Owned by: public.psql_serial_tab.id
2787 \pset tuples_only true
2791 Result data type | double precision
2792 Argument data types | double precision
2794 --------------------+-----------------
2797 Result data type | numeric
2798 Argument data types | numeric
2801 \pset tuples_only false
2802 -- check conditional am display
2804 CREATE SCHEMA tableam_display;
2805 CREATE ROLE regress_display_role;
2806 ALTER SCHEMA tableam_display OWNER TO regress_display_role;
2807 SET search_path TO tableam_display;
2808 CREATE ACCESS METHOD heap_psql TYPE TABLE HANDLER heap_tableam_handler;
2809 SET ROLE TO regress_display_role;
2810 -- Use only relations with a physical size of zero.
2811 CREATE TABLE tbl_heap_psql(f1 int, f2 char(100)) using heap_psql;
2812 CREATE TABLE tbl_heap(f1 int, f2 char(100)) using heap;
2813 CREATE VIEW view_heap_psql AS SELECT f1 from tbl_heap_psql;
2814 CREATE MATERIALIZED VIEW mat_view_heap_psql USING heap_psql AS SELECT f1 from tbl_heap_psql;
2816 Table "tableam_display.tbl_heap_psql"
2817 Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
2818 --------+----------------+-----------+----------+---------+----------+--------------+-------------
2819 f1 | integer | | | | plain | |
2820 f2 | character(100) | | | | extended | |
2823 Table "tableam_display.tbl_heap"
2824 Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
2825 --------+----------------+-----------+----------+---------+----------+--------------+-------------
2826 f1 | integer | | | | plain | |
2827 f2 | character(100) | | | | extended | |
2829 \set HIDE_TABLEAM off
2831 Table "tableam_display.tbl_heap_psql"
2832 Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
2833 --------+----------------+-----------+----------+---------+----------+--------------+-------------
2834 f1 | integer | | | | plain | |
2835 f2 | character(100) | | | | extended | |
2836 Access method: heap_psql
2839 Table "tableam_display.tbl_heap"
2840 Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
2841 --------+----------------+-----------+----------+---------+----------+--------------+-------------
2842 f1 | integer | | | | plain | |
2843 f2 | character(100) | | | | extended | |
2846 -- AM is displayed for tables, indexes and materialized views.
2849 Schema | Name | Type | Owner | Persistence | Access method | Size | Description
2850 -----------------+--------------------+-------------------+----------------------+-------------+---------------+---------+-------------
2851 tableam_display | mat_view_heap_psql | materialized view | regress_display_role | permanent | heap_psql | 0 bytes |
2852 tableam_display | tbl_heap | table | regress_display_role | permanent | heap | 0 bytes |
2853 tableam_display | tbl_heap_psql | table | regress_display_role | permanent | heap_psql | 0 bytes |
2854 tableam_display | view_heap_psql | view | regress_display_role | permanent | | 0 bytes |
2859 Schema | Name | Type | Owner | Persistence | Access method | Size | Description
2860 -----------------+---------------+-------+----------------------+-------------+---------------+---------+-------------
2861 tableam_display | tbl_heap | table | regress_display_role | permanent | heap | 0 bytes |
2862 tableam_display | tbl_heap_psql | table | regress_display_role | permanent | heap_psql | 0 bytes |
2867 Schema | Name | Type | Owner | Persistence | Access method | Size | Description
2868 -----------------+--------------------+-------------------+----------------------+-------------+---------------+---------+-------------
2869 tableam_display | mat_view_heap_psql | materialized view | regress_display_role | permanent | heap_psql | 0 bytes |
2872 -- But not for views and sequences.
2875 Schema | Name | Type | Owner | Persistence | Size | Description
2876 -----------------+----------------+------+----------------------+-------------+---------+-------------
2877 tableam_display | view_heap_psql | view | regress_display_role | permanent | 0 bytes |
2880 \set HIDE_TABLEAM on
2883 Schema | Name | Type | Owner | Persistence | Size | Description
2884 -----------------+--------------------+-------------------+----------------------+-------------+---------+-------------
2885 tableam_display | mat_view_heap_psql | materialized view | regress_display_role | permanent | 0 bytes |
2886 tableam_display | tbl_heap | table | regress_display_role | permanent | 0 bytes |
2887 tableam_display | tbl_heap_psql | table | regress_display_role | permanent | 0 bytes |
2888 tableam_display | view_heap_psql | view | regress_display_role | permanent | 0 bytes |
2893 DROP SCHEMA tableam_display CASCADE;
2894 NOTICE: drop cascades to 4 other objects
2895 DETAIL: drop cascades to table tableam_display.tbl_heap_psql
2896 drop cascades to table tableam_display.tbl_heap
2897 drop cascades to view tableam_display.view_heap_psql
2898 drop cascades to materialized view tableam_display.mat_view_heap_psql
2899 DROP ACCESS METHOD heap_psql;
2900 DROP ROLE regress_display_role;
2901 -- test numericlocale (as best we can without control of psql's locale)
2902 \pset format aligned
2904 \pset numericlocale true
2905 select n, -n as m, n * 111 as x, '1e90'::float8 as f
2906 from generate_series(0,3) n;
2908 ---+----+-----+-------
2910 1 | -1 | 111 | 1e+90
2911 2 | -2 | 222 | 1e+90
2912 3 | -3 | 333 | 1e+90
2915 \pset numericlocale false
2916 -- test asciidoc output format
2917 \pset format asciidoc
2920 \d psql_serial_tab_id_seq
2922 .Sequence "public.psql_serial_tab_id_seq"
2923 [options="header",cols="<l,>l,>l,>l,>l,<l,>l",frame="none"]
2925 ^l|Type ^l|Start ^l|Minimum ^l|Maximum ^l|Increment ^l|Cycles? ^l|Cache
2926 |integer |1 |1 |2147483647 |1 |no |1
2930 Owned by: public.psql_serial_tab.id
2932 \pset tuples_only true
2935 [cols="<l,<l,<l,<l,<l",frame="none"]
2937 |pg_catalog |exp |double precision |double precision |func
2938 |pg_catalog |exp |numeric |numeric |func
2940 \pset tuples_only false
2942 \d psql_serial_tab_id_seq
2944 .Sequence "public.psql_serial_tab_id_seq"
2945 [cols="h,l",frame="none"]
2951 <l|Maximum >l|2147483647
2958 Owned by: public.psql_serial_tab.id
2960 \pset tuples_only true
2963 [cols="h,l",frame="none"]
2966 <l|Schema <l|pg_catalog
2968 <l|Result data type <l|double precision
2969 <l|Argument data types <l|double precision
2972 <l|Schema <l|pg_catalog
2974 <l|Result data type <l|numeric
2975 <l|Argument data types <l|numeric
2978 \pset tuples_only false
2980 select 'some|text' as "a|title", ' ' as "empty ", n as int
2981 from generate_series(1,2) as n;
2986 [options="header",cols="<l,<l,>l",frame="none",grid="none"]
2988 ^l|a\|title ^l|empty ^l|int
2999 [options="header",cols="<l,<l,>l",frame="none"]
3001 ^l|a\|title ^l|empty ^l|int
3012 [options="header",cols="<l,<l,>l",frame="all",grid="all"]
3014 ^l|a\|title ^l|empty ^l|int
3026 [cols="h,l",frame="none",grid="none"]
3029 <l|a\|title <l|some\|text
3033 <l|a\|title <l|some\|text
3040 [cols="h,l",frame="none"]
3043 <l|a\|title <l|some\|text
3047 <l|a\|title <l|some\|text
3054 [cols="h,l",frame="all",grid="all"]
3057 <l|a\|title <l|some\|text
3061 <l|a\|title <l|some\|text
3066 -- test csv output format
3070 \d psql_serial_tab_id_seq
3071 Type,Start,Minimum,Maximum,Increment,Cycles?,Cache
3072 integer,1,1,2147483647,1,no,1
3073 \pset tuples_only true
3075 pg_catalog,exp,double precision,double precision,func
3076 pg_catalog,exp,numeric,numeric,func
3077 \pset tuples_only false
3079 \d psql_serial_tab_id_seq
3087 \pset tuples_only true
3091 Result data type,double precision
3092 Argument data types,double precision
3096 Result data type,numeric
3097 Argument data types,numeric
3099 \pset tuples_only false
3101 select 'some"text' as "a""title", E' <foo>\n<bar>' as "junk",
3102 ' ' as "empty", n as int
3103 from generate_series(1,2) as n;
3106 "a""title",junk,empty,int
3107 "some""text"," <foo>
3109 "some""text"," <foo>
3113 "a""title","some""text"
3118 "a""title","some""text"
3126 select 'comma,comma' as comma, 'semi;semi' as semi;
3128 "comma,comma",semi;semi
3129 \pset csv_fieldsep ';'
3130 select 'comma,comma' as comma, 'semi;semi' as semi;
3132 comma,comma;"semi;semi"
3133 select '\.' as data;
3136 \pset csv_fieldsep '.'
3137 select '\' as d1, '' as d2;
3140 -- illegal csv separators
3141 \pset csv_fieldsep ''
3142 \pset: csv_fieldsep must be a single one-byte character
3143 \pset csv_fieldsep '\0'
3144 \pset: csv_fieldsep must be a single one-byte character
3145 \pset csv_fieldsep '\n'
3146 \pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
3147 \pset csv_fieldsep '\r'
3148 \pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
3149 \pset csv_fieldsep '"'
3150 \pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
3151 \pset csv_fieldsep ',,'
3152 \pset: csv_fieldsep must be a single one-byte character
3153 \pset csv_fieldsep ','
3154 -- test html output format
3158 \d psql_serial_tab_id_seq
3160 <caption>Sequence "public.psql_serial_tab_id_seq"</caption>
3162 <th align="center">Type</th>
3163 <th align="center">Start</th>
3164 <th align="center">Minimum</th>
3165 <th align="center">Maximum</th>
3166 <th align="center">Increment</th>
3167 <th align="center">Cycles?</th>
3168 <th align="center">Cache</th>
3171 <td align="left">integer</td>
3172 <td align="right">1</td>
3173 <td align="right">1</td>
3174 <td align="right">2147483647</td>
3175 <td align="right">1</td>
3176 <td align="left">no</td>
3177 <td align="right">1</td>
3180 <p>Owned by: public.psql_serial_tab.id<br />
3182 \pset tuples_only true
3186 <td align="left">pg_catalog</td>
3187 <td align="left">exp</td>
3188 <td align="left">double precision</td>
3189 <td align="left">double precision</td>
3190 <td align="left">func</td>
3193 <td align="left">pg_catalog</td>
3194 <td align="left">exp</td>
3195 <td align="left">numeric</td>
3196 <td align="left">numeric</td>
3197 <td align="left">func</td>
3201 \pset tuples_only false
3203 \d psql_serial_tab_id_seq
3205 <caption>Sequence "public.psql_serial_tab_id_seq"</caption>
3207 <tr><td colspan="2" align="center">Record 1</td></tr>
3210 <td align="left">integer</td>
3214 <td align="right">1</td>
3218 <td align="right">1</td>
3222 <td align="right">2147483647</td>
3226 <td align="right">1</td>
3230 <td align="left">no</td>
3234 <td align="right">1</td>
3237 <p>Owned by: public.psql_serial_tab.id<br />
3239 \pset tuples_only true
3243 <tr><td colspan="2"> </td></tr>
3246 <td align="left">pg_catalog</td>
3250 <td align="left">exp</td>
3253 <th>Result data type</th>
3254 <td align="left">double precision</td>
3257 <th>Argument data types</th>
3258 <td align="left">double precision</td>
3262 <td align="left">func</td>
3265 <tr><td colspan="2"> </td></tr>
3268 <td align="left">pg_catalog</td>
3272 <td align="left">exp</td>
3275 <th>Result data type</th>
3276 <td align="left">numeric</td>
3279 <th>Argument data types</th>
3280 <td align="left">numeric</td>
3284 <td align="left">func</td>
3288 \pset tuples_only false
3290 select 'some"text' as "a&title", E' <foo>\n<bar>' as "junk",
3291 ' ' as "empty", n as int
3292 from generate_series(1,2) as n;
3298 <th align="center">a&title</th>
3299 <th align="center">junk</th>
3300 <th align="center">empty</th>
3301 <th align="center">int</th>
3304 <td align="left">some"text</td>
3305 <td align="left"> <foo><br />
3307 <td align="left"> </td>
3308 <td align="right">1</td>
3311 <td align="left">some"text</td>
3312 <td align="left"> <foo><br />
3314 <td align="left"> </td>
3315 <td align="right">2</td>
3324 <th align="center">a&title</th>
3325 <th align="center">junk</th>
3326 <th align="center">empty</th>
3327 <th align="center">int</th>
3330 <td align="left">some"text</td>
3331 <td align="left"> <foo><br />
3333 <td align="left"> </td>
3334 <td align="right">1</td>
3337 <td align="left">some"text</td>
3338 <td align="left"> <foo><br />
3340 <td align="left"> </td>
3341 <td align="right">2</td>
3346 \pset tableattr foobar
3348 <table border="1" foobar>
3350 <th align="center">a&title</th>
3351 <th align="center">junk</th>
3352 <th align="center">empty</th>
3353 <th align="center">int</th>
3356 <td align="left">some"text</td>
3357 <td align="left"> <foo><br />
3359 <td align="left"> </td>
3360 <td align="right">1</td>
3363 <td align="left">some"text</td>
3364 <td align="left"> <foo><br />
3366 <td align="left"> </td>
3367 <td align="right">2</td>
3378 <tr><td colspan="2" align="center">Record 1</td></tr>
3380 <th>a&title</th>
3381 <td align="left">some"text</td>
3385 <td align="left"> <foo><br />
3390 <td align="left"> </td>
3394 <td align="right">1</td>
3397 <tr><td colspan="2" align="center">Record 2</td></tr>
3399 <th>a&title</th>
3400 <td align="left">some"text</td>
3404 <td align="left"> <foo><br />
3409 <td align="left"> </td>
3413 <td align="right">2</td>
3421 <tr><td colspan="2" align="center">Record 1</td></tr>
3423 <th>a&title</th>
3424 <td align="left">some"text</td>
3428 <td align="left"> <foo><br />
3433 <td align="left"> </td>
3437 <td align="right">1</td>
3440 <tr><td colspan="2" align="center">Record 2</td></tr>
3442 <th>a&title</th>
3443 <td align="left">some"text</td>
3447 <td align="left"> <foo><br />
3452 <td align="left"> </td>
3456 <td align="right">2</td>
3460 \pset tableattr foobar
3462 <table border="1" foobar>
3464 <tr><td colspan="2" align="center">Record 1</td></tr>
3466 <th>a&title</th>
3467 <td align="left">some"text</td>
3471 <td align="left"> <foo><br />
3476 <td align="left"> </td>
3480 <td align="right">1</td>
3483 <tr><td colspan="2" align="center">Record 2</td></tr>
3485 <th>a&title</th>
3486 <td align="left">some"text</td>
3490 <td align="left"> <foo><br />
3495 <td align="left"> </td>
3499 <td align="right">2</td>
3505 -- test latex output format
3509 \d psql_serial_tab_id_seq
3511 Sequence "public.psql\_serial\_tab\_id\_seq"
3514 \begin{tabular}{l | r | r | r | r | l | r}
3515 \textit{Type} & \textit{Start} & \textit{Minimum} & \textit{Maximum} & \textit{Increment} & \textit{Cycles?} & \textit{Cache} \\
3517 integer & 1 & 1 & 2147483647 & 1 & no & 1 \\
3520 \noindent Owned by: public.psql\_serial\_tab.id \\
3522 \pset tuples_only true
3524 \begin{tabular}{l | l | l | l | l}
3525 pg\_catalog & exp & double precision & double precision & func \\
3526 pg\_catalog & exp & numeric & numeric & func \\
3530 \pset tuples_only false
3532 \d psql_serial_tab_id_seq
3534 Sequence "public.psql\_serial\_tab\_id\_seq"
3537 \begin{tabular}{c|l}
3538 \multicolumn{2}{c}{\textit{Record 1}} \\
3543 Maximum & 2147483647 \\
3549 \noindent Owned by: public.psql\_serial\_tab.id \\
3551 \pset tuples_only true
3553 \begin{tabular}{c|l}
3555 Schema & pg\_catalog \\
3557 Result data type & double precision \\
3558 Argument data types & double precision \\
3561 Schema & pg\_catalog \\
3563 Result data type & numeric \\
3564 Argument data types & numeric \\
3569 \pset tuples_only false
3571 select 'some\more_text' as "a$title", E' #<foo>%&^~|\n{bar}' as "junk",
3572 ' ' as "empty", n as int
3573 from generate_series(1,2) as n;
3577 \begin{tabular}{lllr}
3578 \textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
3580 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
3581 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
3584 \noindent (2 rows) \\
3588 \begin{tabular}{l | l | l | r}
3589 \textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
3591 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
3592 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
3595 \noindent (2 rows) \\
3599 \begin{tabular}{| l | l | l | r |}
3601 \textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
3603 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
3604 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
3608 \noindent (2 rows) \\
3612 \begin{tabular}{| l | l | l | r |}
3614 \textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
3616 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
3618 some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
3622 \noindent (2 rows) \\
3628 \multicolumn{2}{c}{\textit{Record 1}} \\
3629 a\$title & some\textbackslash{}more\_text \\
3630 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3633 \multicolumn{2}{c}{\textit{Record 2}} \\
3634 a\$title & some\textbackslash{}more\_text \\
3635 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3643 \begin{tabular}{c|l}
3644 \multicolumn{2}{c}{\textit{Record 1}} \\
3646 a\$title & some\textbackslash{}more\_text \\
3647 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3650 \multicolumn{2}{c}{\textit{Record 2}} \\
3652 a\$title & some\textbackslash{}more\_text \\
3653 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3661 \begin{tabular}{|c|l|}
3663 \multicolumn{2}{|c|}{\textit{Record 1}} \\
3665 a\$title & some\textbackslash{}more\_text \\
3666 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3670 \multicolumn{2}{|c|}{\textit{Record 2}} \\
3672 a\$title & some\textbackslash{}more\_text \\
3673 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3682 \begin{tabular}{|c|l|}
3684 \multicolumn{2}{|c|}{\textit{Record 1}} \\
3686 a\$title & some\textbackslash{}more\_text \\
3687 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3691 \multicolumn{2}{|c|}{\textit{Record 2}} \\
3693 a\$title & some\textbackslash{}more\_text \\
3694 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3702 -- test latex-longtable output format
3703 \pset format latex-longtable
3706 \d psql_serial_tab_id_seq
3707 \begin{longtable}{l | r | r | r | r | l | r}
3708 \small\textbf{\textit{Type}} & \small\textbf{\textit{Start}} & \small\textbf{\textit{Minimum}} & \small\textbf{\textit{Maximum}} & \small\textbf{\textit{Increment}} & \small\textbf{\textit{Cycles?}} & \small\textbf{\textit{Cache}} \\
3711 \small\textbf{\textit{Type}} & \small\textbf{\textit{Start}} & \small\textbf{\textit{Minimum}} & \small\textbf{\textit{Maximum}} & \small\textbf{\textit{Increment}} & \small\textbf{\textit{Cycles?}} & \small\textbf{\textit{Cache}} \\
3714 \caption[Sequence "public.psql\_serial\_tab\_id\_seq" (Continued)]{Sequence "public.psql\_serial\_tab\_id\_seq"}
3716 \caption[Sequence "public.psql\_serial\_tab\_id\_seq"]{Sequence "public.psql\_serial\_tab\_id\_seq"}
3718 \raggedright{integer}
3724 \raggedright{2147483647}
3730 \raggedright{1} \tabularnewline
3732 \pset tuples_only true
3734 \begin{longtable}{l | l | l | l | l}
3735 \raggedright{pg\_catalog}
3739 \raggedright{double precision}
3741 \raggedright{double precision}
3743 \raggedright{func} \tabularnewline
3744 \raggedright{pg\_catalog}
3748 \raggedright{numeric}
3750 \raggedright{numeric}
3752 \raggedright{func} \tabularnewline
3754 \pset tuples_only false
3756 \d psql_serial_tab_id_seq
3758 Sequence "public.psql\_serial\_tab\_id\_seq"
3761 \begin{tabular}{c|l}
3762 \multicolumn{2}{c}{\textit{Record 1}} \\
3767 Maximum & 2147483647 \\
3773 \noindent Owned by: public.psql\_serial\_tab.id \\
3775 \pset tuples_only true
3777 \begin{tabular}{c|l}
3779 Schema & pg\_catalog \\
3781 Result data type & double precision \\
3782 Argument data types & double precision \\
3785 Schema & pg\_catalog \\
3787 Result data type & numeric \\
3788 Argument data types & numeric \\
3793 \pset tuples_only false
3795 select 'some\more_text' as "a$title", E' #<foo>%&^~|\n{bar}' as "junk",
3796 ' ' as "empty", n as int
3797 from generate_series(1,2) as n;
3801 \begin{longtable}{lllr}
3802 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3805 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3808 \raggedright{some\textbackslash{}more\_text}
3810 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3814 \raggedright{1} \tabularnewline
3815 \raggedright{some\textbackslash{}more\_text}
3817 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3821 \raggedright{2} \tabularnewline
3825 \begin{longtable}{l | l | l | r}
3826 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3829 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3832 \raggedright{some\textbackslash{}more\_text}
3834 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3838 \raggedright{1} \tabularnewline
3839 \raggedright{some\textbackslash{}more\_text}
3841 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3845 \raggedright{2} \tabularnewline
3849 \begin{longtable}{| l | l | l | r |}
3851 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3855 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3862 \raggedright{some\textbackslash{}more\_text}
3864 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3868 \raggedright{1} \tabularnewline
3869 \raggedright{some\textbackslash{}more\_text}
3871 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3875 \raggedright{2} \tabularnewline
3879 \begin{longtable}{| l | l | l | r |}
3881 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3885 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3891 \raggedright{some\textbackslash{}more\_text}
3893 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3897 \raggedright{1} \tabularnewline
3899 \raggedright{some\textbackslash{}more\_text}
3901 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3905 \raggedright{2} \tabularnewline
3910 \begin{longtable}{| p{lr\textwidth} | p{lr\textwidth} | p{lr\textwidth} | r |}
3912 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3916 \small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
3922 \raggedright{some\textbackslash{}more\_text}
3924 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3928 \raggedright{1} \tabularnewline
3930 \raggedright{some\textbackslash{}more\_text}
3932 \raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
3936 \raggedright{2} \tabularnewline
3944 \multicolumn{2}{c}{\textit{Record 1}} \\
3945 a\$title & some\textbackslash{}more\_text \\
3946 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3949 \multicolumn{2}{c}{\textit{Record 2}} \\
3950 a\$title & some\textbackslash{}more\_text \\
3951 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3959 \begin{tabular}{c|l}
3960 \multicolumn{2}{c}{\textit{Record 1}} \\
3962 a\$title & some\textbackslash{}more\_text \\
3963 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3966 \multicolumn{2}{c}{\textit{Record 2}} \\
3968 a\$title & some\textbackslash{}more\_text \\
3969 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3977 \begin{tabular}{|c|l|}
3979 \multicolumn{2}{|c|}{\textit{Record 1}} \\
3981 a\$title & some\textbackslash{}more\_text \\
3982 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3986 \multicolumn{2}{|c|}{\textit{Record 2}} \\
3988 a\$title & some\textbackslash{}more\_text \\
3989 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
3998 \begin{tabular}{|c|l|}
4000 \multicolumn{2}{|c|}{\textit{Record 1}} \\
4002 a\$title & some\textbackslash{}more\_text \\
4003 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
4007 \multicolumn{2}{|c|}{\textit{Record 2}} \\
4009 a\$title & some\textbackslash{}more\_text \\
4010 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
4019 \begin{tabular}{|c|l|}
4021 \multicolumn{2}{|c|}{\textit{Record 1}} \\
4023 a\$title & some\textbackslash{}more\_text \\
4024 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
4028 \multicolumn{2}{|c|}{\textit{Record 2}} \\
4030 a\$title & some\textbackslash{}more\_text \\
4031 junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
4040 -- test troff-ms output format
4041 \pset format troff-ms
4044 \d psql_serial_tab_id_seq
4047 Sequence "public.psql_serial_tab_id_seq"
4052 l | r | r | r | r | l | r.
4053 \fIType\fP \fIStart\fP \fIMinimum\fP \fIMaximum\fP \fIIncrement\fP \fICycles?\fP \fICache\fP
4055 integer 1 1 2147483647 1 no 1
4058 Owned by: public.psql_serial_tab.id
4060 \pset tuples_only true
4066 pg_catalog exp double precision double precision func
4067 pg_catalog exp numeric numeric func
4071 \pset tuples_only false
4073 \d psql_serial_tab_id_seq
4076 Sequence "public.psql_serial_tab_id_seq"
4095 Owned by: public.psql_serial_tab.id
4097 \pset tuples_only true
4106 Result data type double precision
4107 Argument data types double precision
4112 Result data type numeric
4113 Argument data types numeric
4118 \pset tuples_only false
4120 select 'some\text' as "a\title", E' <foo>\n<bar>' as "junk",
4121 ' ' as "empty", n as int
4122 from generate_series(1,2) as n;
4130 \fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
4146 \fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
4162 \fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
4182 a\(rstitle some\(rstext
4192 a\(rstitle some\(rstext
4210 a\(rstitle some\(rstext
4221 a\(rstitle some\(rstext
4239 a\(rstitle some\(rstext
4251 a\(rstitle some\(rstext
4260 -- check ambiguous format requests
4262 \pset: ambiguous abbreviation "a" matches both "aligned" and "asciidoc"
4264 -- clean up after output format tests
4265 drop table psql_serial_tab;
4266 \pset format aligned
4269 -- \echo and allied features
4270 \echo this is a test
4272 \echo -n without newline
4273 without newline\echo with -n newline
4275 \echo '-n' with newline
4280 \qecho this is a test
4284 \warn this is a test
4288 -- tests for \if ... \endif
4296 select 'still okay';
4306 -- at this point query buffer should still have last valid line
4313 -- \if should work okay on part of a query
4326 select \if false \\ (bogus \else \\ 42 \endif \\ forty_two;
4332 -- test a large nested if using a variety of true-equivalents
4340 \echo 'should not print #1-1'
4343 \echo 'should not print #1-2'
4346 \echo 'should not print #1-3'
4349 \echo 'should not print #1-4'
4351 -- test a variety of false-equivalents in an if/elif/else structure
4353 \echo 'should not print #2-1'
4355 \echo 'should not print #2-2'
4357 \echo 'should not print #2-3'
4359 \echo 'should not print #2-4'
4364 -- test true-false elif after initial true branch
4366 \echo 'should print #2-5'
4369 \echo 'should not print #2-6'
4371 \echo 'should not print #2-7'
4373 \echo 'should not print #2-8'
4375 -- test simple true-then-else
4377 \echo 'first thing true'
4380 \echo 'should not print #3-1'
4382 -- test simple false-true-else
4384 \echo 'should not print #4-1'
4386 \echo 'second thing true'
4389 \echo 'should not print #5-1'
4391 -- invalid boolean expressions are false
4392 \if invalid boolean expression
4393 unrecognized value "invalid boolean expression" for "\if expression": Boolean expected
4394 \echo 'will not print #6-1'
4396 \echo 'will print anyway #6-2'
4397 will print anyway #6-2
4399 -- test un-matched endif
4401 \endif: no matching \if
4402 -- test un-matched else
4404 \else: no matching \if
4405 -- test un-matched elif
4407 \elif: no matching \if
4408 -- test double-else error
4412 \else: cannot occur after \else
4414 -- test elif out-of-order
4418 \elif: cannot occur after \else
4420 -- test if-endif matching in a false branch
4423 \echo 'should not print #7-1'
4425 \echo 'should not print #7-2'
4427 \echo 'should not print #7-3'
4429 \echo 'should print #7-4'
4432 -- show that vars and backticks are not expanded when ignoring extra args
4434 \echo :foo :'foo' :"foo"
4436 \pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
4437 \pset: extra argument "nosuchcommand" ignored
4438 \pset: extra argument ":foo" ignored
4439 \pset: extra argument ":'foo'" ignored
4440 \pset: extra argument ":"foo"" ignored
4441 -- show that vars and backticks are not expanded and commands are ignored
4442 -- when in a false if-branch
4443 \set try_to_quit '\\q'
4446 \echo `nosuchcommand` :foo :'foo' :"foo"
4447 \pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
4450 \c arg1 arg2 arg3 arg4
4453 \copy arg1 arg2 arg3 arg4 arg5 arg6
4455 SELECT 1 as one, 2, 3 \crosstabview
4460 \echo arg1 arg2 arg3 arg4 arg5
4468 SELECT 1 AS one \gset
4486 \set arg1 arg2 arg3 arg4 arg5 arg6 arg7
4497 -- \else here is eaten as part of OT_FILEPIPE argument
4498 \w |/no/such/file \else
4499 -- \endif here is eaten as part of whole-line argument
4500 \! whole_line \endif
4503 \echo 'should print #8-1'
4506 -- :{?...} defined variable test
4509 \echo '#9-1 ok, variable i is defined'
4510 #9-1 ok, variable i is defined
4512 \echo 'should not print #9-2'
4514 \if :{?no_such_variable}
4515 \echo 'should not print #10-1'
4517 \echo '#10-2 ok, variable no_such_variable is not defined'
4518 #10-2 ok, variable no_such_variable is not defined
4520 SELECT :{?i} AS i_is_defined;
4526 SELECT NOT :{?no_such_var} AS no_such_var_is_not_defined;
4527 no_such_var_is_not_defined
4528 ----------------------------
4533 \set SHOW_CONTEXT never
4537 raise exception 'bar';
4541 \set SHOW_CONTEXT errors
4545 raise exception 'bar';
4549 CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE
4550 \set SHOW_CONTEXT always
4554 raise exception 'bar';
4557 CONTEXT: PL/pgSQL function inline_code_block line 3 at RAISE
4559 CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE
4560 -- test printing and clearing the query buffer
4592 -- tests for special result variables
4593 -- working query, 2 rows selected
4594 SELECT 1 AS stuff UNION SELECT 2;
4601 \echo 'error:' :ERROR
4603 \echo 'error code:' :SQLSTATE
4605 \echo 'number of rows:' :ROW_COUNT
4609 ERROR: syntax error at or near ";"
4610 LINE 1: SELECT 1 UNION;
4612 \echo 'error:' :ERROR
4614 \echo 'error code:' :SQLSTATE
4616 \echo 'number of rows:' :ROW_COUNT
4618 \echo 'last error message:' :LAST_ERROR_MESSAGE
4619 last error message: syntax error at or near ";"
4620 \echo 'last error code:' :LAST_ERROR_SQLSTATE
4621 last error code: 42601
4624 \echo 'error:' :ERROR
4626 \echo 'error code:' :SQLSTATE
4628 \echo 'number of rows:' :ROW_COUNT
4630 -- must have kept previous values
4631 \echo 'last error message:' :LAST_ERROR_MESSAGE
4632 last error message: syntax error at or near ";"
4633 \echo 'last error code:' :LAST_ERROR_SQLSTATE
4634 last error code: 42601
4635 -- other query error
4636 DROP TABLE this_table_does_not_exist;
4637 ERROR: table "this_table_does_not_exist" does not exist
4638 \echo 'error:' :ERROR
4640 \echo 'error code:' :SQLSTATE
4642 \echo 'number of rows:' :ROW_COUNT
4644 \echo 'last error message:' :LAST_ERROR_MESSAGE
4645 last error message: table "this_table_does_not_exist" does not exist
4646 \echo 'last error code:' :LAST_ERROR_SQLSTATE
4647 last error code: 42P01
4648 -- nondefault verbosity error settings (except verbose, which is too unstable)
4649 \set VERBOSITY terse
4651 ERROR: syntax error at or near ";" at character 15
4652 \echo 'error:' :ERROR
4654 \echo 'error code:' :SQLSTATE
4656 \echo 'last error message:' :LAST_ERROR_MESSAGE
4657 last error message: syntax error at or near ";"
4658 \set VERBOSITY sqlstate
4661 \echo 'error:' :ERROR
4663 \echo 'error code:' :SQLSTATE
4665 \echo 'last error message:' :LAST_ERROR_MESSAGE
4666 last error message: division by zero
4667 \set VERBOSITY default
4669 SELECT 3 AS three, 4 AS four \gdesc
4676 \echo 'error:' :ERROR
4678 \echo 'error code:' :SQLSTATE
4680 \echo 'number of rows:' :ROW_COUNT
4682 -- \gdesc with an error
4684 ERROR: syntax error at end of input
4687 \echo 'error:' :ERROR
4689 \echo 'error code:' :SQLSTATE
4691 \echo 'number of rows:' :ROW_COUNT
4693 \echo 'last error message:' :LAST_ERROR_MESSAGE
4694 last error message: syntax error at end of input
4695 \echo 'last error code:' :LAST_ERROR_SQLSTATE
4696 last error code: 42601
4697 -- check row count for a cursor-fetched query
4699 select unique2 from tenk1 order by unique2 limit 19;
4723 \echo 'error:' :ERROR
4725 \echo 'error code:' :SQLSTATE
4727 \echo 'number of rows:' :ROW_COUNT
4729 -- cursor-fetched query with an error after the first group
4730 select 1/(15-unique2) from tenk1 order by unique2 limit 19;
4743 ERROR: division by zero
4744 \echo 'error:' :ERROR
4746 \echo 'error code:' :SQLSTATE
4748 \echo 'number of rows:' :ROW_COUNT
4750 \echo 'last error message:' :LAST_ERROR_MESSAGE
4751 last error message: division by zero
4752 \echo 'last error code:' :LAST_ERROR_SQLSTATE
4753 last error code: 22012
4755 create schema testpart;
4756 create role regress_partitioning_role;
4757 alter schema testpart owner to regress_partitioning_role;
4758 set role to regress_partitioning_role;
4759 -- run test inside own schema and hide other partitions
4760 set search_path to testpart;
4761 create table testtable_apple(logdate date);
4762 create table testtable_orange(logdate date);
4763 create index testtable_apple_index on testtable_apple(logdate);
4764 create index testtable_orange_index on testtable_orange(logdate);
4765 create table testpart_apple(logdate date) partition by range(logdate);
4766 create table testpart_orange(logdate date) partition by range(logdate);
4767 create index testpart_apple_index on testpart_apple(logdate);
4768 create index testpart_orange_index on testpart_orange(logdate);
4769 -- only partition related object should be displayed
4771 List of partitioned relations
4772 Schema | Name | Owner | Type | Parent name | Table
4773 ----------+----------------------+---------------------------+-------------------+-------------+----------------
4774 testpart | testpart_apple | regress_partitioning_role | partitioned table | |
4775 testpart | testpart_apple_index | regress_partitioning_role | partitioned index | | testpart_apple
4779 List of partitioned tables
4780 Schema | Name | Owner | Parent name
4781 ----------+----------------+---------------------------+-------------
4782 testpart | testpart_apple | regress_partitioning_role |
4786 List of partitioned indexes
4787 Schema | Name | Owner | Parent name | Table
4788 ----------+----------------------+---------------------------+-------------+----------------
4789 testpart | testpart_apple_index | regress_partitioning_role | | testpart_apple
4792 drop table testtable_apple;
4793 drop table testtable_orange;
4794 drop table testpart_apple;
4795 drop table testpart_orange;
4796 create table parent_tab (id int) partition by range (id);
4797 create index parent_index on parent_tab (id);
4798 create table child_0_10 partition of parent_tab
4799 for values from (0) to (10);
4800 create table child_10_20 partition of parent_tab
4801 for values from (10) to (20);
4802 create table child_20_30 partition of parent_tab
4803 for values from (20) to (30);
4804 insert into parent_tab values (generate_series(0,29));
4805 create table child_30_40 partition of parent_tab
4806 for values from (30) to (40)
4807 partition by range(id);
4808 create table child_30_35 partition of child_30_40
4809 for values from (30) to (35);
4810 create table child_35_40 partition of child_30_40
4811 for values from (35) to (40);
4812 insert into parent_tab values (generate_series(30,39));
4814 List of partitioned tables
4815 Schema | Name | Owner
4816 ----------+------------+---------------------------
4817 testpart | parent_tab | regress_partitioning_role
4821 List of partitioned indexes
4822 Schema | Name | Owner | Table
4823 ----------+--------------+---------------------------+------------
4824 testpart | parent_index | regress_partitioning_role | parent_tab
4828 List of partitioned relations
4829 Schema | Name | Owner | Type | Parent name | Table
4830 ----------+--------------------+---------------------------+-------------------+--------------+-------------
4831 testpart | parent_tab | regress_partitioning_role | partitioned table | |
4832 testpart | child_30_40 | regress_partitioning_role | partitioned table | parent_tab |
4833 testpart | parent_index | regress_partitioning_role | partitioned index | | parent_tab
4834 testpart | child_30_40_id_idx | regress_partitioning_role | partitioned index | parent_index | child_30_40
4838 List of partitioned relations
4839 Schema | Name | Owner | Type | Table
4840 ----------+--------------+---------------------------+-------------------+------------
4841 testpart | parent_tab | regress_partitioning_role | partitioned table |
4842 testpart | parent_index | regress_partitioning_role | partitioned index | parent_tab
4846 List of partitioned tables
4847 Schema | Name | Owner | Parent name
4848 ----------+-------------+---------------------------+-------------
4849 testpart | parent_tab | regress_partitioning_role |
4850 testpart | child_30_40 | regress_partitioning_role | parent_tab
4854 List of partitioned indexes
4855 Schema | Name | Owner | Parent name | Table
4856 ----------+--------------------+---------------------------+--------------+-------------
4857 testpart | parent_index | regress_partitioning_role | | parent_tab
4858 testpart | child_30_40_id_idx | regress_partitioning_role | parent_index | child_30_40
4862 List of partitioned relations
4863 Schema | Name | Owner | Type | Parent name | Table
4864 ----------+--------------------+---------------------------+-------------------+--------------+-------------
4865 testpart | parent_tab | regress_partitioning_role | partitioned table | |
4866 testpart | child_30_40 | regress_partitioning_role | partitioned table | parent_tab |
4867 testpart | parent_index | regress_partitioning_role | partitioned index | | parent_tab
4868 testpart | child_30_40_id_idx | regress_partitioning_role | partitioned index | parent_index | child_30_40
4872 List of partitioned relations
4873 Schema | Name | Owner | Type | Parent name | Table
4874 ----------+--------------------+---------------------------+-------------------+--------------+-------------
4875 testpart | parent_tab | regress_partitioning_role | partitioned table | |
4876 testpart | child_30_40 | regress_partitioning_role | partitioned table | parent_tab |
4877 testpart | parent_index | regress_partitioning_role | partitioned index | | parent_tab
4878 testpart | child_30_40_id_idx | regress_partitioning_role | partitioned index | parent_index | child_30_40
4881 drop table parent_tab cascade;
4882 drop schema testpart;
4883 set search_path to default;
4884 set role to default;
4885 drop role regress_partitioning_role;
4886 -- \d on toast table (use pg_statistic's toast table, which has a known name)
4887 \d pg_toast.pg_toast_2619
4888 TOAST table "pg_toast.pg_toast_2619"
4890 ------------+---------
4894 Owning table: "pg_catalog.pg_statistic"
4896 "pg_toast_2619_index" PRIMARY KEY, btree (chunk_id, chunk_seq)
4898 -- check printing info about access methods
4900 List of access methods
4914 List of access methods
4928 List of access methods
4937 List of access methods
4943 List of access methods
4948 \dA: extra argument "bar" ignored
4950 List of access methods
4951 Name | Type | Handler | Description
4952 --------+-------+----------------------+----------------------------------------
4953 brin | Index | brinhandler | block range index (BRIN) access method
4954 btree | Index | bthandler | b-tree index access method
4955 gin | Index | ginhandler | GIN index access method
4956 gist | Index | gisthandler | GiST index access method
4957 hash | Index | hashhandler | hash index access method
4958 heap | Table | heap_tableam_handler | heap table access method
4959 heap2 | Table | heap_tableam_handler |
4960 spgist | Index | spghandler | SP-GiST index access method
4964 List of access methods
4965 Name | Type | Handler | Description
4966 --------+-------+----------------------+----------------------------------------
4967 brin | Index | brinhandler | block range index (BRIN) access method
4968 btree | Index | bthandler | b-tree index access method
4969 gin | Index | ginhandler | GIN index access method
4970 gist | Index | gisthandler | GiST index access method
4971 hash | Index | hashhandler | hash index access method
4972 heap | Table | heap_tableam_handler | heap table access method
4973 heap2 | Table | heap_tableam_handler |
4974 spgist | Index | spghandler | SP-GiST index access method
4978 List of access methods
4979 Name | Type | Handler | Description
4980 -------+-------+----------------------+--------------------------
4981 hash | Index | hashhandler | hash index access method
4982 heap | Table | heap_tableam_handler | heap table access method
4983 heap2 | Table | heap_tableam_handler |
4987 List of access methods
4988 Name | Type | Handler | Description
4989 ------+------+---------+-------------
4993 List of operator classes
4994 AM | Input type | Storage type | Operator class | Default?
4995 ------+------------+--------------+----------------------+----------
4996 brin | oid | | oid_bloom_ops | no
4997 brin | oid | | oid_minmax_multi_ops | no
4998 brin | oid | | oid_minmax_ops | yes
5002 List of operator families
5003 AM | Operator family | Applicable types
5004 --------+-----------------+------------------
5005 spgist | box_ops | box
5006 spgist | kd_point_ops | point
5007 spgist | network_ops | inet
5008 spgist | poly_ops | polygon
5009 spgist | quad_point_ops | point
5010 spgist | range_ops | anyrange
5011 spgist | text_ops | text
5015 List of operator families
5016 AM | Operator family | Applicable types
5017 -------+-----------------+---------------------------
5018 btree | integer_ops | smallint, integer, bigint
5021 \dAo+ btree float_ops
5022 List of operators of operator families
5023 AM | Operator family | Operator | Strategy | Purpose | Sort opfamily
5024 -------+-----------------+---------------------------------------+----------+---------+---------------
5025 btree | float_ops | <(double precision,double precision) | 1 | search |
5026 btree | float_ops | <=(double precision,double precision) | 2 | search |
5027 btree | float_ops | =(double precision,double precision) | 3 | search |
5028 btree | float_ops | >=(double precision,double precision) | 4 | search |
5029 btree | float_ops | >(double precision,double precision) | 5 | search |
5030 btree | float_ops | <(real,real) | 1 | search |
5031 btree | float_ops | <=(real,real) | 2 | search |
5032 btree | float_ops | =(real,real) | 3 | search |
5033 btree | float_ops | >=(real,real) | 4 | search |
5034 btree | float_ops | >(real,real) | 5 | search |
5035 btree | float_ops | <(double precision,real) | 1 | search |
5036 btree | float_ops | <=(double precision,real) | 2 | search |
5037 btree | float_ops | =(double precision,real) | 3 | search |
5038 btree | float_ops | >=(double precision,real) | 4 | search |
5039 btree | float_ops | >(double precision,real) | 5 | search |
5040 btree | float_ops | <(real,double precision) | 1 | search |
5041 btree | float_ops | <=(real,double precision) | 2 | search |
5042 btree | float_ops | =(real,double precision) | 3 | search |
5043 btree | float_ops | >=(real,double precision) | 4 | search |
5044 btree | float_ops | >(real,double precision) | 5 | search |
5047 \dAo * pg_catalog.jsonb_path_ops
5048 List of operators of operator families
5049 AM | Operator family | Operator | Strategy | Purpose
5050 -----+-----------------+--------------------+----------+---------
5051 gin | jsonb_path_ops | @>(jsonb,jsonb) | 7 | search
5052 gin | jsonb_path_ops | @?(jsonb,jsonpath) | 15 | search
5053 gin | jsonb_path_ops | @@(jsonb,jsonpath) | 16 | search
5056 \dAp+ btree float_ops
5057 List of support functions of operator families
5058 AM | Operator family | Registered left type | Registered right type | Number | Function
5059 -------+-----------------+----------------------+-----------------------+--------+------------------------------------------------------------------------------
5060 btree | float_ops | double precision | double precision | 1 | btfloat8cmp(double precision,double precision)
5061 btree | float_ops | double precision | double precision | 2 | btfloat8sortsupport(internal)
5062 btree | float_ops | double precision | double precision | 3 | in_range(double precision,double precision,double precision,boolean,boolean)
5063 btree | float_ops | real | real | 1 | btfloat4cmp(real,real)
5064 btree | float_ops | real | real | 2 | btfloat4sortsupport(internal)
5065 btree | float_ops | double precision | real | 1 | btfloat84cmp(double precision,real)
5066 btree | float_ops | real | double precision | 1 | btfloat48cmp(real,double precision)
5067 btree | float_ops | real | double precision | 3 | in_range(real,real,double precision,boolean,boolean)
5070 \dAp * pg_catalog.uuid_ops
5071 List of support functions of operator families
5072 AM | Operator family | Registered left type | Registered right type | Number | Function
5073 -------+-----------------+----------------------+-----------------------+--------+--------------------
5074 btree | uuid_ops | uuid | uuid | 1 | uuid_cmp
5075 btree | uuid_ops | uuid | uuid | 2 | uuid_sortsupport
5076 btree | uuid_ops | uuid | uuid | 4 | btequalimage
5077 hash | uuid_ops | uuid | uuid | 1 | uuid_hash
5078 hash | uuid_ops | uuid | uuid | 2 | uuid_hash_extended
5081 -- check \df, \do with argument specifications
5084 Schema | Name | Result data type | Argument data types | Type
5085 ------------+--------------+------------------+---------------------+------
5086 pg_catalog | dsqrt | double precision | double precision | func
5087 pg_catalog | numeric_sqrt | numeric | numeric | func
5088 pg_catalog | sqrt | double precision | double precision | func
5089 pg_catalog | sqrt | numeric | numeric | func
5094 Schema | Name | Result data type | Argument data types | Type
5095 ------------+--------------+------------------+---------------------+------
5096 pg_catalog | numeric_sqrt | numeric | numeric | func
5097 pg_catalog | sqrt | numeric | numeric | func
5102 Schema | Name | Result data type | Argument data types | Type
5103 ------------+-------------+------------------+---------------------+------
5104 pg_catalog | int24pl | integer | smallint, integer | func
5105 pg_catalog | int28pl | bigint | smallint, bigint | func
5106 pg_catalog | int2pl | smallint | smallint, smallint | func
5107 pg_catalog | int42pl | integer | integer, smallint | func
5108 pg_catalog | int48pl | bigint | integer, bigint | func
5109 pg_catalog | int4pl | integer | integer, integer | func
5110 pg_catalog | int82pl | bigint | bigint, smallint | func
5111 pg_catalog | int84pl | bigint | bigint, integer | func
5112 pg_catalog | int8pl | bigint | bigint, bigint | func
5113 pg_catalog | interval_pl | interval | interval, interval | func
5118 Schema | Name | Result data type | Argument data types | Type
5119 ------------+---------+------------------+---------------------+------
5120 pg_catalog | int42pl | integer | integer, smallint | func
5121 pg_catalog | int48pl | bigint | integer, bigint | func
5122 pg_catalog | int4pl | integer | integer, integer | func
5125 \df int*pl * pg_catalog.int8
5127 Schema | Name | Result data type | Argument data types | Type
5128 ------------+---------+------------------+---------------------+------
5129 pg_catalog | int28pl | bigint | smallint, bigint | func
5130 pg_catalog | int48pl | bigint | integer, bigint | func
5131 pg_catalog | int8pl | bigint | bigint, bigint | func
5136 Schema | Name | Result data type | Argument data types | Type
5137 ------------+-------------+------------------+----------------------------------------------------------------------------------------------------+------
5138 pg_catalog | aclcontains | boolean | aclitem[], aclitem | func
5139 pg_catalog | aclexplode | SETOF record | acl aclitem[], OUT grantor oid, OUT grantee oid, OUT privilege_type text, OUT is_grantable boolean | func
5140 pg_catalog | aclinsert | aclitem[] | aclitem[], aclitem | func
5141 pg_catalog | aclremove | aclitem[] | aclitem[], aclitem | func
5144 \df has_database_privilege oid text
5146 Schema | Name | Result data type | Argument data types | Type
5147 ------------+------------------------+------------------+---------------------+------
5148 pg_catalog | has_database_privilege | boolean | oid, text | func
5149 pg_catalog | has_database_privilege | boolean | oid, text, text | func
5152 \df has_database_privilege oid text -
5154 Schema | Name | Result data type | Argument data types | Type
5155 ------------+------------------------+------------------+---------------------+------
5156 pg_catalog | has_database_privilege | boolean | oid, text | func
5161 Schema | Name | Result data type | Argument data types | Type
5162 ------------+---------+------------------+---------------------+------
5163 pg_catalog | bit_and | smallint | smallint | agg
5164 pg_catalog | bit_or | smallint | smallint | agg
5165 pg_catalog | bit_xor | smallint | smallint | agg
5168 \do - pg_catalog.int4
5170 Schema | Name | Left arg type | Right arg type | Result type | Description
5171 ------------+------+---------------+----------------+-------------+-------------
5172 pg_catalog | - | | integer | integer | negate
5177 Schema | Name | Left arg type | Right arg type | Result type | Description
5178 ------------+------+---------------+----------------+-------------+-------------
5179 pg_catalog | && | anyarray | anyarray | boolean | overlaps