2013-02-02 23:06:38 +01:00
--
-- Tests for psql features that aren't closely connected to any
-- specific server features
--
Make psql reject attempts to set special variables to invalid values.
Previously, if the user set a special variable such as ECHO to an
unrecognized value, psql would bleat but store the new value anyway, and
then fall back to a default setting for the behavior controlled by the
variable. This was agreed to be a not particularly good idea. With
this patch, invalid values result in an error message and no change in
state.
(But this applies only to variables that affect psql's behavior; purely
informational variables such as ENCODING can still be set to random
values.)
To do this, modify the API for psql's assign-hook functions so that they
can return an OK/not OK result, and give them the responsibility for
printing error messages when they reject a value. Adjust the APIs for
ParseVariableBool and ParseVariableNum to support the new behavior
conveniently.
In passing, document the variable VERSION, which had somehow escaped that.
And improve the quite-inadequate commenting in psql/variables.c.
Daniel Vérité, reviewed by Rahila Syed, some further tweaking by me
Discussion: https://postgr.es/m/7356e741-fa59-4146-a8eb-cf95fd6b21fb@mm
2017-01-30 22:37:15 +01:00
-- \set
-- fail: invalid name
\set invalid/name foo
invalid variable name: "invalid/name"
-- fail: invalid value for special variable
\set AUTOCOMMIT foo
unrecognized value "foo" for "AUTOCOMMIT": boolean expected
\set FETCH_COUNT foo
invalid value "foo" for "FETCH_COUNT": integer expected
2013-02-02 23:06:38 +01:00
-- \gset
select 10 as test01, 20 as test02, 'Hello' as test03 \gset pref01_
\echo :pref01_test01 :pref01_test02 :pref01_test03
10 20 Hello
-- should fail: bad variable name
select 10 as "bad name"
\gset
Make psql reject attempts to set special variables to invalid values.
Previously, if the user set a special variable such as ECHO to an
unrecognized value, psql would bleat but store the new value anyway, and
then fall back to a default setting for the behavior controlled by the
variable. This was agreed to be a not particularly good idea. With
this patch, invalid values result in an error message and no change in
state.
(But this applies only to variables that affect psql's behavior; purely
informational variables such as ENCODING can still be set to random
values.)
To do this, modify the API for psql's assign-hook functions so that they
can return an OK/not OK result, and give them the responsibility for
printing error messages when they reject a value. Adjust the APIs for
ParseVariableBool and ParseVariableNum to support the new behavior
conveniently.
In passing, document the variable VERSION, which had somehow escaped that.
And improve the quite-inadequate commenting in psql/variables.c.
Daniel Vérité, reviewed by Rahila Syed, some further tweaking by me
Discussion: https://postgr.es/m/7356e741-fa59-4146-a8eb-cf95fd6b21fb@mm
2017-01-30 22:37:15 +01:00
invalid variable name: "bad name"
2013-02-02 23:06:38 +01:00
-- multiple backslash commands in one line
select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
1
select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
3
4
select 5 as x, 6 as y \gset pref01_ \\ \g \echo :pref01_x :pref01_y
x | y
---+---
5 | 6
(1 row)
5 6
select 7 as x, 8 as y \g \gset pref01_ \echo :pref01_x :pref01_y
x | y
---+---
7 | 8
(1 row)
7 8
-- NULL should unset the variable
\set var2 xyz
select 1 as var1, NULL as var2, 3 as var3 \gset
\echo :var1 :var2 :var3
1 :var2 3
-- \gset requires just one tuple
select 10 as test01, 20 as test02 from generate_series(1,3) \gset
more than one row returned for \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset
no rows returned for \gset
-- \gset should work in FETCH_COUNT mode too
\set FETCH_COUNT 1
select 1 as x, 2 as y \gset pref01_ \\ \echo :pref01_x
1
select 3 as x, 4 as y \gset pref01_ \echo :pref01_x \echo :pref01_y
3
4
select 10 as test01, 20 as test02 from generate_series(1,3) \gset
more than one row returned for \gset
select 10 as test01, 20 as test02 from generate_series(1,0) \gset
no rows returned for \gset
Add a \gexec command to psql for evaluation of computed queries.
\gexec executes the just-entered query, like \g, but instead of printing
the results it takes each field as a SQL command to send to the server.
Computing a series of queries to be executed is a fairly common thing,
but up to now you always had to resort to kluges like writing the queries
to a file and then inputting the file. Now it can be done with no
intermediate step.
The implementation is fairly straightforward except for its interaction
with FETCH_COUNT. ExecQueryUsingCursor isn't capable of being called
recursively, and even if it were, its need to create a transaction
block interferes unpleasantly with the desired behavior of \gexec after
a failure of a generated query (i.e., that it can continue). Therefore,
disable use of ExecQueryUsingCursor when doing the master \gexec query.
We can still apply it to individual generated queries, however, and there
might be some value in doing so.
While testing this feature's interaction with single-step mode, I (tgl) was
led to conclude that SendQuery needs to recognize SIGINT (cancel_pressed)
as a negative response to the single-step prompt. Perhaps that's a
back-patchable bug fix, but for now I just included it here.
Corey Huinker, reviewed by Jim Nasby, Daniel Vérité, and myself
2016-04-04 21:25:16 +02:00
\unset FETCH_COUNT
-- \gexec
create temporary table gexec_test(a int, b text, c date, d float);
select format('create index on gexec_test(%I)', attname)
from pg_attribute
where attrelid = 'gexec_test'::regclass and attnum > 0
order by attnum
\gexec
create index on gexec_test(a)
create index on gexec_test(b)
create index on gexec_test(c)
create index on gexec_test(d)
-- \gexec should work in FETCH_COUNT mode too
-- (though the fetch limit applies to the executed queries not the meta query)
\set FETCH_COUNT 1
select 'select 1 as ones', 'select x.y, x.y*2 as double from generate_series(1,4) as x(y)'
union all
select 'drop table gexec_test', NULL
union all
select 'drop table gexec_test', 'select ''2000-01-01''::date as party_over'
\gexec
select 1 as ones
ones
------
1
(1 row)
select x.y, x.y*2 as double from generate_series(1,4) as x(y)
y | double
---+--------
1 | 2
2 | 4
3 | 6
4 | 8
(4 rows)
drop table gexec_test
drop table gexec_test
ERROR: table "gexec_test" does not exist
select '2000-01-01'::date as party_over
party_over
------------
01-01-2000
(1 row)
2013-02-02 23:06:38 +01:00
\unset FETCH_COUNT
2013-10-03 21:18:02 +02:00
-- show all pset options
\pset
2014-10-19 03:58:17 +02:00
border 1
columns 0
expanded off
fieldsep '|'
fieldsep_zero off
footer on
format aligned
linestyle ascii
null ''
numericlocale off
pager 1
2015-03-28 16:07:41 +01:00
pager_min_lines 0
2014-10-19 03:58:17 +02:00
recordsep '\n'
recordsep_zero off
tableattr
title
tuples_only off
unicode_border_linestyle single
unicode_column_linestyle single
unicode_header_linestyle single
2014-04-28 19:41:36 +02:00
-- test multi-line headers, wrapping, and newline indicators
2014-08-18 13:06:11 +02:00
prepare q as select array_to_string(array_agg(repeat('x',2*n)),E'\n') as "ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c", array_to_string(array_agg(repeat('y',20-2*n)),E'\n') as "a
2016-10-10 22:41:57 +02:00
bc" from generate_series(1,10) as n(n) group by n>1 order by n>1;
2014-04-28 19:41:36 +02:00
\pset linestyle ascii
\pset expanded off
\pset columns 40
\pset border 0
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
ab + a +
+ bc
c
2014-04-28 19:41:36 +02:00
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx +yyyyyyyyyyyyyyyy +
xxxxxx +yyyyyyyyyyyyyy +
xxxxxxxx +yyyyyyyyyyyy +
xxxxxxxxxx +yyyyyyyyyy +
xxxxxxxxxxxx +yyyyyyyy +
xxxxxxxxxxxxxx +yyyyyy +
xxxxxxxxxxxxxxxx +yyyy +
xxxxxxxxxxxxxxxxxx +yy +
xxxxxxxxxxxxxxxxxxxx
(2 rows)
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
ab + a +
+ bc
c
2014-04-28 19:41:36 +02:00
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx +yyyyyyyyyyyyyyyy +
xxxxxx +yyyyyyyyyyyyyy +
xxxxxxxx +yyyyyyyyyyyy +
xxxxxxxxxx +yyyyyyyyyy +
xxxxxxxxxxxx +yyyyyyyy +
xxxxxxxxxxxxxx +yyyyyy +
xxxxxxxxxxxxxxxx +yyyy +
xxxxxxxxxxxxxxxxxx +yy +
xxxxxxxxxxxxxxxxxxxx
(2 rows)
\pset border 1
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
ab +| a +
+| bc
c |
2014-04-28 19:41:36 +02:00
----------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx +| yyyyyyyyyyyyyyyy +
xxxxxx +| yyyyyyyyyyyyyy +
xxxxxxxx +| yyyyyyyyyyyy +
xxxxxxxxxx +| yyyyyyyyyy +
xxxxxxxxxxxx +| yyyyyyyy +
xxxxxxxxxxxxxx +| yyyyyy +
xxxxxxxxxxxxxxxx +| yyyy +
xxxxxxxxxxxxxxxxxx +| yy +
xxxxxxxxxxxxxxxxxxxx |
(2 rows)
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
ab +| a +
+| bc
c |
2014-04-28 19:41:36 +02:00
-------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx +| yyyyyyyyyyyyyyyy +
xxxxxx +| yyyyyyyyyyyyyy +
xxxxxxxx +| yyyyyyyyyyyy +
xxxxxxxxxx +| yyyyyyyyyy +
xxxxxxxxxxxx +| yyyyyyyy +
xxxxxxxxxxxxxx +| yyyyyy +
xxxxxxxxxxxxxxxx +| yyyy +
xxxxxxxxxxxxxxxxx.| yy +
.x +|
xxxxxxxxxxxxxxxxx.|
.xxx |
(2 rows)
\pset border 2
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
+----------------------+--------------------+
2014-08-18 13:06:11 +02:00
| ab +| a +|
| +| bc |
| c | |
2014-04-28 19:41:36 +02:00
+----------------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx +| yyyyyyyyyyyyyyyy +|
| xxxxxx +| yyyyyyyyyyyyyy +|
| xxxxxxxx +| yyyyyyyyyyyy +|
| xxxxxxxxxx +| yyyyyyyyyy +|
| xxxxxxxxxxxx +| yyyyyyyy +|
| xxxxxxxxxxxxxx +| yyyyyy +|
| xxxxxxxxxxxxxxxx +| yyyy +|
| xxxxxxxxxxxxxxxxxx +| yy +|
| xxxxxxxxxxxxxxxxxxxx | |
+----------------------+--------------------+
(2 rows)
\pset format wrapped
execute q;
+-----------------+--------------------+
2014-08-18 13:06:11 +02:00
| ab +| a +|
| +| bc |
| c | |
2014-04-28 19:41:36 +02:00
+-----------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx +| yyyyyyyyyyyyyyyy +|
| xxxxxx +| yyyyyyyyyyyyyy +|
| xxxxxxxx +| yyyyyyyyyyyy +|
| xxxxxxxxxx +| yyyyyyyyyy +|
| xxxxxxxxxxxx +| yyyyyyyy +|
| xxxxxxxxxxxxxx +| yyyyyy +|
| xxxxxxxxxxxxxxx.| yyyy +|
|.x +| yy +|
| xxxxxxxxxxxxxxx.| |
|.xxx +| |
| xxxxxxxxxxxxxxx.| |
|.xxxxx | |
+-----------------+--------------------+
(2 rows)
\pset expanded on
\pset columns 20
\pset border 0
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
* Record 1
ab+ xx
2014-04-28 19:41:36 +02:00
+
2014-08-18 13:06:11 +02:00
c
a + yyyyyyyyyyyyyyyyyy
bc
* Record 2
ab+ xxxx +
2014-04-28 19:41:36 +02:00
+ xxxxxx +
2014-08-18 13:06:11 +02:00
c xxxxxxxx +
2014-04-28 19:41:36 +02:00
xxxxxxxxxx +
xxxxxxxxxxxx +
xxxxxxxxxxxxxx +
xxxxxxxxxxxxxxxx +
xxxxxxxxxxxxxxxxxx +
2014-08-18 13:06:11 +02:00
xxxxxxxxxxxxxxxxxxxx
a + yyyyyyyyyyyyyyyy +
bc yyyyyyyyyyyyyy +
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyy +
yyyyyyyyyy +
yyyyyyyy +
yyyyyy +
yyyy +
yy +
2014-08-18 13:06:11 +02:00
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
* Record 1
ab+ xx
2014-04-28 19:41:36 +02:00
+
2014-08-18 13:06:11 +02:00
c
a + yyyyyyyyyyyyyyy.
bc .yyy
* Record 2
ab+ xxxx +
+ xxxxxx +
c xxxxxxxx +
xxxxxxxxxx +
xxxxxxxxxxxx +
xxxxxxxxxxxxxx +
xxxxxxxxxxxxxxx.
.x +
xxxxxxxxxxxxxxx.
.xxx +
xxxxxxxxxxxxxxx.
.xxxxx
a + yyyyyyyyyyyyyyy.
bc .y +
yyyyyyyyyyyyyy +
yyyyyyyyyyyy +
yyyyyyyyyy +
yyyyyyyy +
yyyyyy +
yyyy +
yy +
2014-04-28 19:41:36 +02:00
\pset border 1
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
-[ RECORD 1 ]------------
ab+| xx
2014-04-28 19:41:36 +02:00
+|
2014-08-18 13:06:11 +02:00
c |
a +| yyyyyyyyyyyyyyyyyy
bc |
-[ RECORD 2 ]------------
ab+| xxxx +
2014-04-28 19:41:36 +02:00
+| xxxxxx +
2014-08-18 13:06:11 +02:00
c | xxxxxxxx +
2014-04-28 19:41:36 +02:00
| xxxxxxxxxx +
| xxxxxxxxxxxx +
| xxxxxxxxxxxxxx +
| xxxxxxxxxxxxxxxx +
| xxxxxxxxxxxxxxxxxx +
2014-08-18 13:06:11 +02:00
| xxxxxxxxxxxxxxxxxxxx
a +| yyyyyyyyyyyyyyyy +
bc | yyyyyyyyyyyyyy +
2014-04-28 19:41:36 +02:00
| yyyyyyyyyyyy +
| yyyyyyyyyy +
| yyyyyyyy +
| yyyyyy +
| yyyy +
| yy +
2014-08-18 13:06:11 +02:00
|
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
-[ RECORD 1 ]------
ab+| xx
2014-04-28 19:41:36 +02:00
+|
2014-08-18 13:06:11 +02:00
c |
a +| yyyyyyyyyyyyyy.
bc |.yyyy
-[ RECORD 2 ]------
ab+| xxxx +
+| xxxxxx +
c | xxxxxxxx +
| xxxxxxxxxx +
| xxxxxxxxxxxx +
| xxxxxxxxxxxxxx+
| xxxxxxxxxxxxxx.
|.xx +
| xxxxxxxxxxxxxx.
|.xxxx +
| xxxxxxxxxxxxxx.
|.xxxxxx
a +| yyyyyyyyyyyyyy.
bc |.yy +
| yyyyyyyyyyyyyy+
| yyyyyyyyyyyy +
| yyyyyyyyyy +
| yyyyyyyy +
| yyyyyy +
| yyyy +
| yy +
|
2014-04-28 19:41:36 +02:00
\pset border 2
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
+-[ RECORD 1 ]--------------+
| ab+| xx |
| +| |
| c | |
| a +| yyyyyyyyyyyyyyyyyy |
| bc | |
+-[ RECORD 2 ]--------------+
| ab+| xxxx +|
| +| xxxxxx +|
| c | xxxxxxxx +|
| | xxxxxxxxxx +|
| | xxxxxxxxxxxx +|
| | xxxxxxxxxxxxxx +|
| | xxxxxxxxxxxxxxxx +|
| | xxxxxxxxxxxxxxxxxx +|
| | xxxxxxxxxxxxxxxxxxxx |
| a +| yyyyyyyyyyyyyyyy +|
| bc | yyyyyyyyyyyyyy +|
| | yyyyyyyyyyyy +|
| | yyyyyyyyyy +|
| | yyyyyyyy +|
| | yyyyyy +|
| | yyyy +|
| | yy +|
| | |
+----+----------------------+
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
+-[ RECORD 1 ]-----+
2014-08-18 13:06:11 +02:00
| ab+| xx |
| +| |
| c | |
| a +| yyyyyyyyyyy.|
| bc |.yyyyyyy |
2014-04-28 19:41:36 +02:00
+-[ RECORD 2 ]-----+
2014-08-18 13:06:11 +02:00
| ab+| xxxx +|
| +| xxxxxx +|
| c | xxxxxxxx +|
| | xxxxxxxxxx +|
| | xxxxxxxxxxx.|
| |.x +|
| | xxxxxxxxxxx.|
| |.xxx +|
| | xxxxxxxxxxx.|
| |.xxxxx +|
| | xxxxxxxxxxx.|
| |.xxxxxxx +|
| | xxxxxxxxxxx.|
| |.xxxxxxxxx |
| a +| yyyyyyyyyyy.|
| bc |.yyyyy +|
| | yyyyyyyyyyy.|
| |.yyy +|
| | yyyyyyyyyyy.|
| |.y +|
| | yyyyyyyyyy +|
| | yyyyyyyy +|
| | yyyyyy +|
| | yyyy +|
| | yy +|
| | |
+----+-------------+
2014-04-28 19:41:36 +02:00
\pset linestyle old-ascii
\pset expanded off
\pset columns 40
\pset border 0
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
ab a
+ bc
c +
2014-04-28 19:41:36 +02:00
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(2 rows)
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
ab a
+ bc
c +
2014-04-28 19:41:36 +02:00
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(2 rows)
\pset border 1
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
ab | a
+ |+ bc
+ c |+
2014-04-28 19:41:36 +02:00
----------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx : yyyyyyyyyyyyyy
xxxxxxxx : yyyyyyyyyyyy
xxxxxxxxxx : yyyyyyyyyy
xxxxxxxxxxxx : yyyyyyyy
xxxxxxxxxxxxxx : yyyyyy
xxxxxxxxxxxxxxxx : yyyy
xxxxxxxxxxxxxxxxxx : yy
xxxxxxxxxxxxxxxxxxxx :
(2 rows)
\pset format wrapped
execute q;
2014-08-18 13:06:11 +02:00
ab | a
+ |+ bc
+ c |+
2014-04-28 19:41:36 +02:00
-------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx : yyyyyyyyyyyyyy
xxxxxxxx : yyyyyyyyyyyy
xxxxxxxxxx : yyyyyyyyyy
xxxxxxxxxxxx : yyyyyyyy
xxxxxxxxxxxxxx : yyyyyy
xxxxxxxxxxxxxxxx : yyyy
xxxxxxxxxxxxxxxxx : yy
x :
xxxxxxxxxxxxxxxxx
xxx
(2 rows)
\pset border 2
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|a
bc
2014-04-28 19:41:36 +02:00
xx|yyyyyyyyyyyyyyyyyy
xxxx
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
(2 rows)
\pset format aligned
execute q;
+----------------------+--------------------+
2014-08-18 13:06:11 +02:00
| ab | a |
|+ |+ bc |
|+ c |+ |
2014-04-28 19:41:36 +02:00
+----------------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx | yyyyyyyyyyyyyyyy |
| xxxxxx : yyyyyyyyyyyyyy |
| xxxxxxxx : yyyyyyyyyyyy |
| xxxxxxxxxx : yyyyyyyyyy |
| xxxxxxxxxxxx : yyyyyyyy |
| xxxxxxxxxxxxxx : yyyyyy |
| xxxxxxxxxxxxxxxx : yyyy |
| xxxxxxxxxxxxxxxxxx : yy |
| xxxxxxxxxxxxxxxxxxxx : |
+----------------------+--------------------+
(2 rows)
\pset format wrapped
execute q;
+-----------------+--------------------+
2014-08-18 13:06:11 +02:00
| ab | a |
|+ |+ bc |
|+ c |+ |
2014-04-28 19:41:36 +02:00
+-----------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx | yyyyyyyyyyyyyyyy |
| xxxxxx : yyyyyyyyyyyyyy |
| xxxxxxxx : yyyyyyyyyyyy |
| xxxxxxxxxx : yyyyyyyyyy |
| xxxxxxxxxxxx : yyyyyyyy |
| xxxxxxxxxxxxxx : yyyyyy |
| xxxxxxxxxxxxxxx : yyyy |
| x : yy |
| xxxxxxxxxxxxxxx : |
| xxx |
| xxxxxxxxxxxxxxx |
| xxxxx |
+-----------------+--------------------+
(2 rows)
\pset expanded on
\pset columns 20
\pset border 0
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
* Record 1
ab xx
2014-04-28 19:41:36 +02:00
+
2014-08-18 13:06:11 +02:00
+c
a yyyyyyyyyyyyyyyyyy
+bc
* Record 2
ab xxxx
+ xxxxxx
+c xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a yyyyyyyyyyyyyyyy
+bc yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
* Record 1
2014-08-18 13:06:11 +02:00
ab xx
2014-04-28 19:41:36 +02:00
+
2014-08-18 13:06:11 +02:00
+c
a yyyyyyyyyyyyyyyy
+bc yy
2014-04-28 19:41:36 +02:00
* Record 2
2014-08-18 13:06:11 +02:00
ab xxxx
+ xxxxxx
+c xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xx
xxxxxxxxxxxxxxxx
xxxx
a yyyyyyyyyyyyyyyy
+bc yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
2014-04-28 19:41:36 +02:00
\pset border 1
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
-[ RECORD 1 ]-------------
ab | xx
+ ;
+c ;
a | yyyyyyyyyyyyyyyyyy
+bc ;
-[ RECORD 2 ]-------------
ab | xxxx
+ : xxxxxx
+c : xxxxxxxx
: xxxxxxxxxx
: xxxxxxxxxxxx
: xxxxxxxxxxxxxx
: xxxxxxxxxxxxxxxx
: xxxxxxxxxxxxxxxxxx
: xxxxxxxxxxxxxxxxxxxx
a | yyyyyyyyyyyyyyyy
+bc : yyyyyyyyyyyyyy
: yyyyyyyyyyyy
: yyyyyyyyyy
: yyyyyyyy
: yyyyyy
: yyyy
: yy
:
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
-[ RECORD 1 ]-------
2014-08-18 13:06:11 +02:00
ab | xx
+ ;
+c ;
a | yyyyyyyyyyyyyy
+bc ; yyyy
2014-04-28 19:41:36 +02:00
-[ RECORD 2 ]-------
2014-08-18 13:06:11 +02:00
ab | xxxx
+ : xxxxxx
+c : xxxxxxxx
: xxxxxxxxxx
: xxxxxxxxxxxx
: xxxxxxxxxxxxxx
: xxxxxxxxxxxxxx
; xx
: xxxxxxxxxxxxxx
; xxxx
: xxxxxxxxxxxxxx
; xxxxxx
a | yyyyyyyyyyyyyy
+bc ; yy
: yyyyyyyyyyyyyy
: yyyyyyyyyyyy
: yyyyyyyyyy
: yyyyyyyy
: yyyyyy
: yyyy
: yy
:
2014-04-28 19:41:36 +02:00
\pset border 2
\pset format unaligned
execute q;
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xx
2014-04-28 19:41:36 +02:00
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
ab
2014-04-28 19:41:36 +02:00
2014-08-18 13:06:11 +02:00
c|xxxx
2014-04-28 19:41:36 +02:00
xxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
a
2014-08-18 13:06:11 +02:00
bc|yyyyyyyyyyyyyyyy
2014-04-28 19:41:36 +02:00
yyyyyyyyyyyyyy
yyyyyyyyyyyy
yyyyyyyyyy
yyyyyyyy
yyyyyy
yyyy
yy
\pset format aligned
execute q;
2014-08-18 13:06:11 +02:00
+-[ RECORD 1 ]--------------+
| ab | xx |
|+ ; |
|+c ; |
| a | yyyyyyyyyyyyyyyyyy |
|+bc ; |
+-[ RECORD 2 ]--------------+
| ab | xxxx |
|+ : xxxxxx |
|+c : xxxxxxxx |
| : xxxxxxxxxx |
| : xxxxxxxxxxxx |
| : xxxxxxxxxxxxxx |
| : xxxxxxxxxxxxxxxx |
| : xxxxxxxxxxxxxxxxxx |
| : xxxxxxxxxxxxxxxxxxxx |
| a | yyyyyyyyyyyyyyyy |
|+bc : yyyyyyyyyyyyyy |
| : yyyyyyyyyyyy |
| : yyyyyyyyyy |
| : yyyyyyyy |
| : yyyyyy |
| : yyyy |
| : yy |
| : |
+----+----------------------+
2014-04-28 19:41:36 +02:00
\pset format wrapped
execute q;
+-[ RECORD 1 ]-----+
2014-08-18 13:06:11 +02:00
| ab | xx |
|+ ; |
|+c ; |
| a | yyyyyyyyyyy |
|+bc ; yyyyyyy |
2014-04-28 19:41:36 +02:00
+-[ RECORD 2 ]-----+
2014-08-18 13:06:11 +02:00
| ab | xxxx |
|+ : xxxxxx |
|+c : xxxxxxxx |
| : xxxxxxxxxx |
| : xxxxxxxxxxx |
| ; x |
| : xxxxxxxxxxx |
| ; xxx |
| : xxxxxxxxxxx |
| ; xxxxx |
| : xxxxxxxxxxx |
| ; xxxxxxx |
| : xxxxxxxxxxx |
| ; xxxxxxxxx |
| a | yyyyyyyyyyy |
|+bc ; yyyyy |
| : yyyyyyyyyyy |
| ; yyy |
| : yyyyyyyyyyy |
| ; y |
| : yyyyyyyyyy |
| : yyyyyyyy |
| : yyyyyy |
| : yyyy |
| : yy |
| : |
+----+-------------+
deallocate q;
-- test single-line header and data
prepare q as select repeat('x',2*n) as "0123456789abcdef", repeat('y',20-2*n) as "0123456789" from generate_series(1,10) as n;
\pset linestyle ascii
\pset expanded off
\pset columns 40
\pset border 0
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
0123456789abcdef 0123456789
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(10 rows)
\pset format wrapped
execute q;
0123456789abcdef 0123456789
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(10 rows)
\pset border 1
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
0123456789abcdef | 0123456789
----------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx | yyyyyyyyyyyyyy
xxxxxxxx | yyyyyyyyyyyy
xxxxxxxxxx | yyyyyyyyyy
xxxxxxxxxxxx | yyyyyyyy
xxxxxxxxxxxxxx | yyyyyy
xxxxxxxxxxxxxxxx | yyyy
xxxxxxxxxxxxxxxxxx | yy
xxxxxxxxxxxxxxxxxxxx |
(10 rows)
\pset format wrapped
execute q;
0123456789abcdef | 0123456789
---------------------+------------------
xx | yyyyyyyyyyyyyyyy.
|.yy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx | yyyyyyyyyyyyyy
xxxxxxxx | yyyyyyyyyyyy
xxxxxxxxxx | yyyyyyyyyy
xxxxxxxxxxxx | yyyyyyyy
xxxxxxxxxxxxxx | yyyyyy
xxxxxxxxxxxxxxxx | yyyy
xxxxxxxxxxxxxxxxxx | yy
xxxxxxxxxxxxxxxxxxx.|
.x |
(10 rows)
\pset border 2
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
+----------------------+--------------------+
| 0123456789abcdef | 0123456789 |
+----------------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx | yyyyyyyyyyyyyyyy |
| xxxxxx | yyyyyyyyyyyyyy |
| xxxxxxxx | yyyyyyyyyyyy |
| xxxxxxxxxx | yyyyyyyyyy |
| xxxxxxxxxxxx | yyyyyyyy |
| xxxxxxxxxxxxxx | yyyyyy |
| xxxxxxxxxxxxxxxx | yyyy |
| xxxxxxxxxxxxxxxxxx | yy |
| xxxxxxxxxxxxxxxxxxxx | |
+----------------------+--------------------+
(10 rows)
\pset format wrapped
execute q;
+--------------------+-----------------+
| 0123456789abcdef | 0123456789 |
+--------------------+-----------------+
| xx | yyyyyyyyyyyyyyy.|
| |.yyy |
| xxxx | yyyyyyyyyyyyyyy.|
| |.y |
| xxxxxx | yyyyyyyyyyyyyy |
| xxxxxxxx | yyyyyyyyyyyy |
| xxxxxxxxxx | yyyyyyyyyy |
| xxxxxxxxxxxx | yyyyyyyy |
| xxxxxxxxxxxxxx | yyyyyy |
| xxxxxxxxxxxxxxxx | yyyy |
| xxxxxxxxxxxxxxxxxx | yy |
| xxxxxxxxxxxxxxxxxx.| |
|.xx | |
+--------------------+-----------------+
(10 rows)
\pset expanded on
2015-11-30 23:53:32 +01:00
\pset columns 30
2014-08-18 13:06:11 +02:00
\pset border 0
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
* Record 1
0123456789abcdef xx
0123456789 yyyyyyyyyyyyyyyyyy
* Record 2
0123456789abcdef xxxx
0123456789 yyyyyyyyyyyyyyyy
* Record 3
0123456789abcdef xxxxxx
0123456789 yyyyyyyyyyyyyy
* Record 4
0123456789abcdef xxxxxxxx
0123456789 yyyyyyyyyyyy
* Record 5
0123456789abcdef xxxxxxxxxx
0123456789 yyyyyyyyyy
* Record 6
0123456789abcdef xxxxxxxxxxxx
0123456789 yyyyyyyy
* Record 7
0123456789abcdef xxxxxxxxxxxxxx
0123456789 yyyyyy
* Record 8
0123456789abcdef xxxxxxxxxxxxxxxx
0123456789 yyyy
* Record 9
0123456789abcdef xxxxxxxxxxxxxxxxxx
0123456789 yy
* Record 10
0123456789abcdef xxxxxxxxxxxxxxxxxxxx
0123456789
\pset format wrapped
execute q;
2015-11-30 23:53:32 +01:00
* Record 1
2014-08-18 13:06:11 +02:00
0123456789abcdef xx
2015-11-30 23:53:32 +01:00
0123456789 yyyyyyyyyyyy.
.yyyyyy
* Record 2
0123456789abcdef xxxx
0123456789 yyyyyyyyyyyy.
.yyyy
* Record 3
0123456789abcdef xxxxxx
0123456789 yyyyyyyyyyyy.
2014-08-18 13:06:11 +02:00
.yy
2015-11-30 23:53:32 +01:00
* Record 4
0123456789abcdef xxxxxxxx
0123456789 yyyyyyyyyyyy
* Record 5
0123456789abcdef xxxxxxxxxx
0123456789 yyyyyyyyyy
* Record 6
0123456789abcdef xxxxxxxxxxxx
0123456789 yyyyyyyy
* Record 7
0123456789abcdef xxxxxxxxxxxx.
2014-08-18 13:06:11 +02:00
.xx
2015-11-30 23:53:32 +01:00
0123456789 yyyyyy
* Record 8
0123456789abcdef xxxxxxxxxxxx.
.xxxx
0123456789 yyyy
* Record 9
0123456789abcdef xxxxxxxxxxxx.
.xxxxxx
0123456789 yy
* Record 10
0123456789abcdef xxxxxxxxxxxx.
.xxxxxxxx
0123456789
\pset border 1
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
-[ RECORD 1 ]----+---------------------
0123456789abcdef | xx
0123456789 | yyyyyyyyyyyyyyyyyy
-[ RECORD 2 ]----+---------------------
0123456789abcdef | xxxx
0123456789 | yyyyyyyyyyyyyyyy
-[ RECORD 3 ]----+---------------------
0123456789abcdef | xxxxxx
0123456789 | yyyyyyyyyyyyyy
-[ RECORD 4 ]----+---------------------
0123456789abcdef | xxxxxxxx
0123456789 | yyyyyyyyyyyy
-[ RECORD 5 ]----+---------------------
0123456789abcdef | xxxxxxxxxx
0123456789 | yyyyyyyyyy
-[ RECORD 6 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxx
0123456789 | yyyyyyyy
-[ RECORD 7 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxx
0123456789 | yyyyyy
-[ RECORD 8 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxx
0123456789 | yyyy
-[ RECORD 9 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxx
0123456789 | yy
-[ RECORD 10 ]---+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
0123456789 |
\pset format wrapped
execute q;
-[ RECORD 1 ]----+-----------
0123456789abcdef | xx
0123456789 | yyyyyyyyyy.
|.yyyyyyyy
-[ RECORD 2 ]----+-----------
0123456789abcdef | xxxx
0123456789 | yyyyyyyyyy.
|.yyyyyy
-[ RECORD 3 ]----+-----------
0123456789abcdef | xxxxxx
0123456789 | yyyyyyyyyy.
|.yyyy
-[ RECORD 4 ]----+-----------
0123456789abcdef | xxxxxxxx
0123456789 | yyyyyyyyyy.
|.yy
-[ RECORD 5 ]----+-----------
0123456789abcdef | xxxxxxxxxx
0123456789 | yyyyyyyyyy
-[ RECORD 6 ]----+-----------
0123456789abcdef | xxxxxxxxxx.
|.xx
0123456789 | yyyyyyyy
-[ RECORD 7 ]----+-----------
0123456789abcdef | xxxxxxxxxx.
|.xxxx
0123456789 | yyyyyy
-[ RECORD 8 ]----+-----------
0123456789abcdef | xxxxxxxxxx.
|.xxxxxx
0123456789 | yyyy
-[ RECORD 9 ]----+-----------
0123456789abcdef | xxxxxxxxxx.
|.xxxxxxxx
0123456789 | yy
-[ RECORD 10 ]---+-----------
0123456789abcdef | xxxxxxxxxx.
|.xxxxxxxxxx
0123456789 |
\pset border 2
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
+-[ RECORD 1 ]-----+----------------------+
| 0123456789abcdef | xx |
| 0123456789 | yyyyyyyyyyyyyyyyyy |
+-[ RECORD 2 ]-----+----------------------+
| 0123456789abcdef | xxxx |
| 0123456789 | yyyyyyyyyyyyyyyy |
+-[ RECORD 3 ]-----+----------------------+
| 0123456789abcdef | xxxxxx |
| 0123456789 | yyyyyyyyyyyyyy |
+-[ RECORD 4 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxx |
| 0123456789 | yyyyyyyyyyyy |
+-[ RECORD 5 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxx |
| 0123456789 | yyyyyyyyyy |
+-[ RECORD 6 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxx |
| 0123456789 | yyyyyyyy |
+-[ RECORD 7 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxx |
| 0123456789 | yyyyyy |
+-[ RECORD 8 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxx |
| 0123456789 | yyyy |
+-[ RECORD 9 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
| 0123456789 | yy |
+-[ RECORD 10 ]----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
| 0123456789 | |
+------------------+----------------------+
\pset format wrapped
execute q;
+-[ RECORD 1 ]-----+---------+
| 0123456789abcdef | xx |
| 0123456789 | yyyyyyy.|
| |.yyyyyyy.|
| |.yyyy |
+-[ RECORD 2 ]-----+---------+
| 0123456789abcdef | xxxx |
| 0123456789 | yyyyyyy.|
| |.yyyyyyy.|
| |.yy |
+-[ RECORD 3 ]-----+---------+
| 0123456789abcdef | xxxxxx |
| 0123456789 | yyyyyyy.|
| |.yyyyyyy |
+-[ RECORD 4 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.x |
| 0123456789 | yyyyyyy.|
| |.yyyyy |
+-[ RECORD 5 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxx |
| 0123456789 | yyyyyyy.|
| |.yyy |
+-[ RECORD 6 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxxxx |
| 0123456789 | yyyyyyy.|
| |.y |
+-[ RECORD 7 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxxxxxx |
| 0123456789 | yyyyyy |
+-[ RECORD 8 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxxxxxx.|
| |.xx |
| 0123456789 | yyyy |
+-[ RECORD 9 ]-----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxxxxxx.|
| |.xxxx |
| 0123456789 | yy |
+-[ RECORD 10 ]----+---------+
| 0123456789abcdef | xxxxxxx.|
| |.xxxxxxx.|
| |.xxxxxx |
| 0123456789 | |
+------------------+---------+
\pset expanded on
\pset columns 20
\pset border 0
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
* Record 1
0123456789abcdef xx
0123456789 yyyyyyyyyyyyyyyyyy
* Record 2
0123456789abcdef xxxx
0123456789 yyyyyyyyyyyyyyyy
* Record 3
0123456789abcdef xxxxxx
0123456789 yyyyyyyyyyyyyy
* Record 4
0123456789abcdef xxxxxxxx
0123456789 yyyyyyyyyyyy
* Record 5
0123456789abcdef xxxxxxxxxx
0123456789 yyyyyyyyyy
* Record 6
0123456789abcdef xxxxxxxxxxxx
0123456789 yyyyyyyy
* Record 7
0123456789abcdef xxxxxxxxxxxxxx
0123456789 yyyyyy
* Record 8
0123456789abcdef xxxxxxxxxxxxxxxx
0123456789 yyyy
* Record 9
0123456789abcdef xxxxxxxxxxxxxxxxxx
0123456789 yy
* Record 10
0123456789abcdef xxxxxxxxxxxxxxxxxxxx
0123456789
\pset format wrapped
execute q;
* Record 1
0123456789abcdef xx
0123456789 yyy.
.yyy.
.yyy.
.yyy.
.yyy.
.yyy
* Record 2
0123456789abcdef xxx.
.x
0123456789 yyy.
.yyy.
.yyy.
.yyy.
.yyy.
.y
* Record 3
0123456789abcdef xxx.
.xxx
0123456789 yyy.
.yyy.
.yyy.
.yyy.
2014-08-18 13:06:11 +02:00
.yy
2015-11-30 23:53:32 +01:00
* Record 4
0123456789abcdef xxx.
.xxx.
2014-08-18 13:06:11 +02:00
.xx
2015-11-30 23:53:32 +01:00
0123456789 yyy.
.yyy.
.yyy.
.yyy
* Record 5
0123456789abcdef xxx.
.xxx.
.xxx.
.x
0123456789 yyy.
.yyy.
.yyy.
.y
* Record 6
0123456789abcdef xxx.
.xxx.
.xxx.
.xxx
0123456789 yyy.
.yyy.
2014-08-18 13:06:11 +02:00
.yy
2015-11-30 23:53:32 +01:00
* Record 7
0123456789abcdef xxx.
.xxx.
.xxx.
.xxx.
2014-08-18 13:06:11 +02:00
.xx
2015-11-30 23:53:32 +01:00
0123456789 yyy.
.yyy
* Record 8
0123456789abcdef xxx.
.xxx.
.xxx.
.xxx.
.xxx.
.x
0123456789 yyy.
.y
* Record 9
0123456789abcdef xxx.
.xxx.
.xxx.
.xxx.
.xxx.
.xxx
2014-08-18 13:06:11 +02:00
0123456789 yy
2015-11-30 23:53:32 +01:00
* Record 10
0123456789abcdef xxx.
.xxx.
.xxx.
.xxx.
.xxx.
.xxx.
2014-08-18 13:06:11 +02:00
.xx
0123456789
\pset border 1
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
-[ RECORD 1 ]----+---------------------
0123456789abcdef | xx
0123456789 | yyyyyyyyyyyyyyyyyy
-[ RECORD 2 ]----+---------------------
0123456789abcdef | xxxx
0123456789 | yyyyyyyyyyyyyyyy
-[ RECORD 3 ]----+---------------------
0123456789abcdef | xxxxxx
0123456789 | yyyyyyyyyyyyyy
-[ RECORD 4 ]----+---------------------
0123456789abcdef | xxxxxxxx
0123456789 | yyyyyyyyyyyy
-[ RECORD 5 ]----+---------------------
0123456789abcdef | xxxxxxxxxx
0123456789 | yyyyyyyyyy
-[ RECORD 6 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxx
0123456789 | yyyyyyyy
-[ RECORD 7 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxx
0123456789 | yyyyyy
-[ RECORD 8 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxx
0123456789 | yyyy
-[ RECORD 9 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxx
0123456789 | yy
-[ RECORD 10 ]---+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
0123456789 |
\pset format wrapped
execute q;
-[ RECORD 1 ]----+----
0123456789abcdef | xx
0123456789 | yyy.
|.yyy.
|.yyy.
|.yyy.
|.yyy.
|.yyy
-[ RECORD 2 ]----+----
0123456789abcdef | xxx.
|.x
0123456789 | yyy.
|.yyy.
|.yyy.
|.yyy.
|.yyy.
|.y
-[ RECORD 3 ]----+----
0123456789abcdef | xxx.
|.xxx
0123456789 | yyy.
|.yyy.
|.yyy.
|.yyy.
|.yy
-[ RECORD 4 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xx
0123456789 | yyy.
|.yyy.
|.yyy.
|.yyy
-[ RECORD 5 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.x
0123456789 | yyy.
|.yyy.
|.yyy.
|.y
-[ RECORD 6 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.xxx
0123456789 | yyy.
|.yyy.
|.yy
-[ RECORD 7 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.xxx.
|.xx
0123456789 | yyy.
|.yyy
-[ RECORD 8 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.xxx.
|.xxx.
|.x
0123456789 | yyy.
|.y
-[ RECORD 9 ]----+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.xxx.
|.xxx.
|.xxx
0123456789 | yy
-[ RECORD 10 ]---+----
0123456789abcdef | xxx.
|.xxx.
|.xxx.
|.xxx.
|.xxx.
|.xxx.
|.xx
0123456789 |
\pset border 2
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
+-[ RECORD 1 ]-----+----------------------+
| 0123456789abcdef | xx |
| 0123456789 | yyyyyyyyyyyyyyyyyy |
+-[ RECORD 2 ]-----+----------------------+
| 0123456789abcdef | xxxx |
| 0123456789 | yyyyyyyyyyyyyyyy |
+-[ RECORD 3 ]-----+----------------------+
| 0123456789abcdef | xxxxxx |
| 0123456789 | yyyyyyyyyyyyyy |
+-[ RECORD 4 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxx |
| 0123456789 | yyyyyyyyyyyy |
+-[ RECORD 5 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxx |
| 0123456789 | yyyyyyyyyy |
+-[ RECORD 6 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxx |
| 0123456789 | yyyyyyyy |
+-[ RECORD 7 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxx |
| 0123456789 | yyyyyy |
+-[ RECORD 8 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxx |
| 0123456789 | yyyy |
+-[ RECORD 9 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
| 0123456789 | yy |
+-[ RECORD 10 ]----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
| 0123456789 | |
+------------------+----------------------+
\pset format wrapped
execute q;
+-[ RECORD 1 ]-----+-----+
| 0123456789abcdef | xx |
| 0123456789 | yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy |
+-[ RECORD 2 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.x |
| 0123456789 | yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy.|
| |.y |
+-[ RECORD 3 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx |
| 0123456789 | yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy.|
| |.yy |
+-[ RECORD 4 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xx |
| 0123456789 | yyy.|
| |.yyy.|
| |.yyy.|
| |.yyy |
+-[ RECORD 5 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.x |
| 0123456789 | yyy.|
| |.yyy.|
| |.yyy.|
| |.y |
+-[ RECORD 6 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx |
| 0123456789 | yyy.|
| |.yyy.|
| |.yy |
+-[ RECORD 7 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xx |
| 0123456789 | yyy.|
| |.yyy |
+-[ RECORD 8 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.x |
| 0123456789 | yyy.|
| |.y |
+-[ RECORD 9 ]-----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx |
| 0123456789 | yy |
+-[ RECORD 10 ]----+-----+
| 0123456789abcdef | xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xxx.|
| |.xx |
| 0123456789 | |
+------------------+-----+
\pset linestyle old-ascii
\pset expanded off
\pset columns 40
\pset border 0
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
0123456789abcdef 0123456789
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(10 rows)
\pset format wrapped
execute q;
0123456789abcdef 0123456789
-------------------- ------------------
xx yyyyyyyyyyyyyyyyyy
xxxx yyyyyyyyyyyyyyyy
xxxxxx yyyyyyyyyyyyyy
xxxxxxxx yyyyyyyyyyyy
xxxxxxxxxx yyyyyyyyyy
xxxxxxxxxxxx yyyyyyyy
xxxxxxxxxxxxxx yyyyyy
xxxxxxxxxxxxxxxx yyyy
xxxxxxxxxxxxxxxxxx yy
xxxxxxxxxxxxxxxxxxxx
(10 rows)
\pset border 1
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
0123456789abcdef | 0123456789
----------------------+--------------------
xx | yyyyyyyyyyyyyyyyyy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx | yyyyyyyyyyyyyy
xxxxxxxx | yyyyyyyyyyyy
xxxxxxxxxx | yyyyyyyyyy
xxxxxxxxxxxx | yyyyyyyy
xxxxxxxxxxxxxx | yyyyyy
xxxxxxxxxxxxxxxx | yyyy
xxxxxxxxxxxxxxxxxx | yy
xxxxxxxxxxxxxxxxxxxx |
(10 rows)
\pset format wrapped
execute q;
0123456789abcdef | 0123456789
---------------------+------------------
xx | yyyyyyyyyyyyyyyy
; yy
xxxx | yyyyyyyyyyyyyyyy
xxxxxx | yyyyyyyyyyyyyy
xxxxxxxx | yyyyyyyyyyyy
xxxxxxxxxx | yyyyyyyyyy
xxxxxxxxxxxx | yyyyyyyy
xxxxxxxxxxxxxx | yyyyyy
xxxxxxxxxxxxxxxx | yyyy
xxxxxxxxxxxxxxxxxx | yy
xxxxxxxxxxxxxxxxxxx |
x
(10 rows)
\pset border 2
\pset format unaligned
execute q;
0123456789abcdef|0123456789
xx|yyyyyyyyyyyyyyyyyy
xxxx|yyyyyyyyyyyyyyyy
xxxxxx|yyyyyyyyyyyyyy
xxxxxxxx|yyyyyyyyyyyy
xxxxxxxxxx|yyyyyyyyyy
xxxxxxxxxxxx|yyyyyyyy
xxxxxxxxxxxxxx|yyyyyy
xxxxxxxxxxxxxxxx|yyyy
xxxxxxxxxxxxxxxxxx|yy
xxxxxxxxxxxxxxxxxxxx|
(10 rows)
\pset format aligned
execute q;
+----------------------+--------------------+
| 0123456789abcdef | 0123456789 |
+----------------------+--------------------+
| xx | yyyyyyyyyyyyyyyyyy |
| xxxx | yyyyyyyyyyyyyyyy |
| xxxxxx | yyyyyyyyyyyyyy |
| xxxxxxxx | yyyyyyyyyyyy |
| xxxxxxxxxx | yyyyyyyyyy |
| xxxxxxxxxxxx | yyyyyyyy |
| xxxxxxxxxxxxxx | yyyyyy |
| xxxxxxxxxxxxxxxx | yyyy |
| xxxxxxxxxxxxxxxxxx | yy |
| xxxxxxxxxxxxxxxxxxxx | |
+----------------------+--------------------+
(10 rows)
\pset format wrapped
execute q;
+--------------------+-----------------+
| 0123456789abcdef | 0123456789 |
+--------------------+-----------------+
| xx | yyyyyyyyyyyyyyy |
| ; yyy |
| xxxx | yyyyyyyyyyyyyyy |
| ; y |
| xxxxxx | yyyyyyyyyyyyyy |
| xxxxxxxx | yyyyyyyyyyyy |
| xxxxxxxxxx | yyyyyyyyyy |
| xxxxxxxxxxxx | yyyyyyyy |
| xxxxxxxxxxxxxx | yyyyyy |
| xxxxxxxxxxxxxxxx | yyyy |
| xxxxxxxxxxxxxxxxxx | yy |
| xxxxxxxxxxxxxxxxxx | |
| xx |
+--------------------+-----------------+
(10 rows)
\pset expanded on
\pset border 0
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
* Record 1
0123456789abcdef xx
0123456789 yyyyyyyyyyyyyyyyyy
* Record 2
0123456789abcdef xxxx
0123456789 yyyyyyyyyyyyyyyy
* Record 3
0123456789abcdef xxxxxx
0123456789 yyyyyyyyyyyyyy
* Record 4
0123456789abcdef xxxxxxxx
0123456789 yyyyyyyyyyyy
* Record 5
0123456789abcdef xxxxxxxxxx
0123456789 yyyyyyyyyy
* Record 6
0123456789abcdef xxxxxxxxxxxx
0123456789 yyyyyyyy
* Record 7
0123456789abcdef xxxxxxxxxxxxxx
0123456789 yyyyyy
* Record 8
0123456789abcdef xxxxxxxxxxxxxxxx
0123456789 yyyy
* Record 9
0123456789abcdef xxxxxxxxxxxxxxxxxx
0123456789 yy
* Record 10
0123456789abcdef xxxxxxxxxxxxxxxxxxxx
0123456789
\pset format wrapped
execute q;
2015-12-01 20:47:13 +01:00
* Record 1
2014-08-18 13:06:11 +02:00
0123456789abcdef xx
0123456789 yyyyyyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 2
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxx
0123456789 yyyyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 3
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxx
0123456789 yyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 4
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxx
0123456789 yyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 5
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxx
0123456789 yyyyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 6
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxxxx
0123456789 yyyyyyyy
2015-12-01 20:47:13 +01:00
* Record 7
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxxxxxx
0123456789 yyyyyy
2015-12-01 20:47:13 +01:00
* Record 8
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxxxxxxxx
0123456789 yyyy
2015-12-01 20:47:13 +01:00
* Record 9
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxxxxxxxxxx
0123456789 yy
2015-12-01 20:47:13 +01:00
* Record 10
2014-08-18 13:06:11 +02:00
0123456789abcdef xxxxxxxxxxxxxxxxxxxx
0123456789
\pset border 1
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
-[ RECORD 1 ]----+---------------------
0123456789abcdef | xx
0123456789 | yyyyyyyyyyyyyyyyyy
-[ RECORD 2 ]----+---------------------
0123456789abcdef | xxxx
0123456789 | yyyyyyyyyyyyyyyy
-[ RECORD 3 ]----+---------------------
0123456789abcdef | xxxxxx
0123456789 | yyyyyyyyyyyyyy
-[ RECORD 4 ]----+---------------------
0123456789abcdef | xxxxxxxx
0123456789 | yyyyyyyyyyyy
-[ RECORD 5 ]----+---------------------
0123456789abcdef | xxxxxxxxxx
0123456789 | yyyyyyyyyy
-[ RECORD 6 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxx
0123456789 | yyyyyyyy
-[ RECORD 7 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxx
0123456789 | yyyyyy
-[ RECORD 8 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxx
0123456789 | yyyy
-[ RECORD 9 ]----+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxx
0123456789 | yy
-[ RECORD 10 ]---+---------------------
0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
0123456789 |
\pset format wrapped
execute q;
2015-12-01 20:47:13 +01:00
-[ RECORD 1 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xx
0123456789 | yyyyyyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 2 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxx
0123456789 | yyyyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 3 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxx
0123456789 | yyyyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 4 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxx
0123456789 | yyyyyyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 5 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxx
0123456789 | yyyyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 6 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxxxx
0123456789 | yyyyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 7 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxxxxxx
0123456789 | yyyyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 8 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxxxxxxxx
0123456789 | yyyy
2015-12-01 20:47:13 +01:00
-[ RECORD 9 ]----+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxxxxxxxxxx
0123456789 | yy
2015-12-01 20:47:13 +01:00
-[ RECORD 10 ]---+---------------------
2014-08-18 13:06:11 +02:00
0123456789abcdef | xxxxxxxxxxxxxxxxxxxx
0123456789 |
\pset border 2
\pset format unaligned
execute q;
0123456789abcdef|xx
0123456789|yyyyyyyyyyyyyyyyyy
0123456789abcdef|xxxx
0123456789|yyyyyyyyyyyyyyyy
0123456789abcdef|xxxxxx
0123456789|yyyyyyyyyyyyyy
0123456789abcdef|xxxxxxxx
0123456789|yyyyyyyyyyyy
0123456789abcdef|xxxxxxxxxx
0123456789|yyyyyyyyyy
0123456789abcdef|xxxxxxxxxxxx
0123456789|yyyyyyyy
0123456789abcdef|xxxxxxxxxxxxxx
0123456789|yyyyyy
0123456789abcdef|xxxxxxxxxxxxxxxx
0123456789|yyyy
0123456789abcdef|xxxxxxxxxxxxxxxxxx
0123456789|yy
0123456789abcdef|xxxxxxxxxxxxxxxxxxxx
0123456789|
\pset format aligned
execute q;
+-[ RECORD 1 ]-----+----------------------+
| 0123456789abcdef | xx |
| 0123456789 | yyyyyyyyyyyyyyyyyy |
+-[ RECORD 2 ]-----+----------------------+
| 0123456789abcdef | xxxx |
| 0123456789 | yyyyyyyyyyyyyyyy |
+-[ RECORD 3 ]-----+----------------------+
| 0123456789abcdef | xxxxxx |
| 0123456789 | yyyyyyyyyyyyyy |
+-[ RECORD 4 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxx |
| 0123456789 | yyyyyyyyyyyy |
+-[ RECORD 5 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxx |
| 0123456789 | yyyyyyyyyy |
+-[ RECORD 6 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxx |
| 0123456789 | yyyyyyyy |
+-[ RECORD 7 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxx |
| 0123456789 | yyyyyy |
+-[ RECORD 8 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxx |
| 0123456789 | yyyy |
+-[ RECORD 9 ]-----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxx |
| 0123456789 | yy |
+-[ RECORD 10 ]----+----------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxxxxx |
| 0123456789 | |
+------------------+----------------------+
\pset format wrapped
execute q;
+-[ RECORD 1 ]-----+-------------------+
| 0123456789abcdef | xx |
| 0123456789 | yyyyyyyyyyyyyyyyy |
| ; y |
+-[ RECORD 2 ]-----+-------------------+
| 0123456789abcdef | xxxx |
| 0123456789 | yyyyyyyyyyyyyyyy |
+-[ RECORD 3 ]-----+-------------------+
| 0123456789abcdef | xxxxxx |
| 0123456789 | yyyyyyyyyyyyyy |
+-[ RECORD 4 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxx |
| 0123456789 | yyyyyyyyyyyy |
+-[ RECORD 5 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxxxx |
| 0123456789 | yyyyyyyyyy |
+-[ RECORD 6 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxxxxxx |
| 0123456789 | yyyyyyyy |
+-[ RECORD 7 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxxxxxxxx |
| 0123456789 | yyyyyy |
+-[ RECORD 8 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxx |
| 0123456789 | yyyy |
+-[ RECORD 9 ]-----+-------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxx |
| ; x |
| 0123456789 | yy |
+-[ RECORD 10 ]----+-------------------+
| 0123456789abcdef | xxxxxxxxxxxxxxxxx |
| ; xxx |
| 0123456789 | |
+------------------+-------------------+
2014-04-28 19:41:36 +02:00
deallocate q;
2016-04-09 01:23:18 +02:00
\pset linestyle ascii
2015-03-31 17:33:25 +02:00
prepare q as select ' | = | lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&' as " | -- | 012345678 9abc def!*@#&!@(*&*~~_+-=\ \", '11' as "0123456789", 11 as int from generate_series(1,10) as n;
\pset format asciidoc
\pset expanded off
\pset border 0
execute q;
[options="header",cols="<l,<l,>l",frame="none",grid="none"]
|====
^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
|====
....
(10 rows)
....
\pset border 1
execute q;
[options="header",cols="<l,<l,>l",frame="none"]
|====
^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
|====
....
(10 rows)
....
\pset border 2
execute q;
[options="header",cols="<l,<l,>l",frame="all",grid="all"]
|====
^l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ ^l|0123456789 ^l|int
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (& |11 |11
|====
....
(10 rows)
....
\pset expanded on
\pset border 0
execute q;
[cols="h,l",frame="none",grid="none"]
|====
2+^|Record 1
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 2
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 3
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 4
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 5
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 6
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 7
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 8
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 9
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 10
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
|====
\pset border 1
execute q;
[cols="h,l",frame="none"]
|====
2+^|Record 1
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 2
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 3
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 4
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 5
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 6
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 7
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 8
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 9
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 10
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
|====
\pset border 2
execute q;
[cols="h,l",frame="all",grid="all"]
|====
2+^|Record 1
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 2
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 3
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 4
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 5
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 6
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 7
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 8
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 9
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
2+^|Record 10
<l| \| -- \| 012345678 9abc def!*@#&!@(*&*~~_+-=\ \ <l| \| = \| lkjsafi\\/ /oeu rio)(!@&*#)*(!&@*) \ (&
<l|0123456789 <l|11
<l|int >l|11
|====
deallocate q;
2016-04-09 01:23:18 +02:00
\pset format aligned
\pset expanded off
\pset border 1
2015-09-05 17:58:20 +02:00
-- SHOW_CONTEXT
\set SHOW_CONTEXT never
do $$
begin
raise notice 'foo';
raise exception 'bar';
end $$;
NOTICE: foo
ERROR: bar
\set SHOW_CONTEXT errors
do $$
begin
raise notice 'foo';
raise exception 'bar';
end $$;
NOTICE: foo
ERROR: bar
CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE
\set SHOW_CONTEXT always
do $$
begin
raise notice 'foo';
raise exception 'bar';
end $$;
NOTICE: foo
CONTEXT: PL/pgSQL function inline_code_block line 3 at RAISE
ERROR: bar
CONTEXT: PL/pgSQL function inline_code_block line 4 at RAISE