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
|
2017-09-11 17:20:47 +02:00
|
|
|
unrecognized value "foo" for "AUTOCOMMIT": Boolean expected
|
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 FETCH_COUNT foo
|
|
|
|
invalid value "foo" for "FETCH_COUNT": integer expected
|
Improve psql's behavior for \set and \unset of its control variables.
This commit improves on the results of commit 511ae628f in two ways:
1. It restores the historical behavior that "\set FOO" is interpreted
as setting FOO to "on", if FOO is a boolean control variable. We
already found one test script that was expecting that behavior, and
the psql documentation certainly does nothing to discourage people
from assuming that would work, since it often says just "if FOO is set"
when describing the effects of a boolean variable. However, now this
case will result in actually setting FOO to "on", not an empty string.
2. It arranges for an "\unset" of a control variable to set the value
back to its default value, rather than becoming apparently undefined.
The control variables are also initialized that way at psql startup.
In combination, these things guarantee that a control variable always
has a displayable value that reflects what psql is actually doing.
That is a pretty substantial usability improvement.
The implementation involves adding a second type of variable hook function
that is able to replace a proposed new value (including NULL) with another
one. We could alternatively have complicated the API of the assign hook,
but this way seems better since many variables can share the same
substitution hook function.
Also document the actual behavior of these variables more fully,
including covering assorted behaviors that were there before but
never documented.
This patch also includes some minor cleanup that should have been in
511ae628f but was missed.
Patch by me, but it owes a lot to discussions with Daniel Vérité.
Discussion: https://postgr.es/m/9572.1485821620@sss.pgh.pa.us
2017-02-01 17:02:40 +01:00
|
|
|
-- check handling of built-in boolean variable
|
|
|
|
\echo :ON_ERROR_ROLLBACK
|
|
|
|
off
|
|
|
|
\set ON_ERROR_ROLLBACK
|
|
|
|
\echo :ON_ERROR_ROLLBACK
|
|
|
|
on
|
|
|
|
\set ON_ERROR_ROLLBACK foo
|
|
|
|
unrecognized value "foo" for "ON_ERROR_ROLLBACK"
|
|
|
|
Available values are: on, off, interactive.
|
|
|
|
\echo :ON_ERROR_ROLLBACK
|
|
|
|
on
|
|
|
|
\set ON_ERROR_ROLLBACK on
|
|
|
|
\echo :ON_ERROR_ROLLBACK
|
|
|
|
on
|
|
|
|
\unset ON_ERROR_ROLLBACK
|
|
|
|
\echo :ON_ERROR_ROLLBACK
|
|
|
|
off
|
2017-03-07 15:31:52 +01:00
|
|
|
-- \g and \gx
|
|
|
|
SELECT 1 as one, 2 as two \g
|
|
|
|
one | two
|
|
|
|
-----+-----
|
|
|
|
1 | 2
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
\gx
|
|
|
|
-[ RECORD 1 ]
|
|
|
|
one | 1
|
|
|
|
two | 2
|
|
|
|
|
|
|
|
SELECT 3 as three, 4 as four \gx
|
|
|
|
-[ RECORD 1 ]
|
|
|
|
three | 3
|
|
|
|
four | 4
|
|
|
|
|
|
|
|
\g
|
|
|
|
three | four
|
|
|
|
-------+------
|
|
|
|
3 | 4
|
|
|
|
(1 row)
|
|
|
|
|
2017-08-24 22:20:50 +02:00
|
|
|
-- \gx should work in FETCH_COUNT mode too
|
|
|
|
\set FETCH_COUNT 1
|
|
|
|
SELECT 1 as one, 2 as two \g
|
|
|
|
one | two
|
|
|
|
-----+-----
|
|
|
|
1 | 2
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
\gx
|
|
|
|
-[ RECORD 1 ]
|
|
|
|
one | 1
|
|
|
|
two | 2
|
|
|
|
|
|
|
|
SELECT 3 as three, 4 as four \gx
|
|
|
|
-[ RECORD 1 ]
|
|
|
|
three | 3
|
|
|
|
four | 4
|
|
|
|
|
|
|
|
\g
|
|
|
|
three | four
|
|
|
|
-------+------
|
|
|
|
3 | 4
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
\unset FETCH_COUNT
|
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
|
2017-09-06 00:17:47 +02:00
|
|
|
-- \gdesc
|
|
|
|
SELECT
|
|
|
|
NULL AS zero,
|
|
|
|
1 AS one,
|
|
|
|
2.0 AS two,
|
|
|
|
'three' AS three,
|
|
|
|
$1 AS four,
|
|
|
|
sin($2) as five,
|
|
|
|
'foo'::varchar(4) as six,
|
|
|
|
CURRENT_DATE AS now
|
|
|
|
\gdesc
|
|
|
|
Column | Type
|
|
|
|
--------+----------------------
|
|
|
|
zero | text
|
|
|
|
one | integer
|
|
|
|
two | numeric
|
|
|
|
three | text
|
|
|
|
four | text
|
|
|
|
five | double precision
|
|
|
|
six | character varying(4)
|
|
|
|
now | date
|
|
|
|
(8 rows)
|
|
|
|
|
|
|
|
-- should work with tuple-returning utilities, such as EXECUTE
|
|
|
|
PREPARE test AS SELECT 1 AS first, 2 AS second;
|
|
|
|
EXECUTE test \gdesc
|
|
|
|
Column | Type
|
|
|
|
--------+---------
|
|
|
|
first | integer
|
|
|
|
second | integer
|
|
|
|
(2 rows)
|
|
|
|
|
|
|
|
EXPLAIN EXECUTE test \gdesc
|
|
|
|
Column | Type
|
|
|
|
------------+------
|
|
|
|
QUERY PLAN | text
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
-- should fail cleanly - syntax error
|
|
|
|
SELECT 1 + \gdesc
|
|
|
|
ERROR: syntax error at end of input
|
|
|
|
LINE 1: SELECT 1 +
|
|
|
|
^
|
|
|
|
-- check behavior with empty results
|
|
|
|
SELECT \gdesc
|
|
|
|
The command has no result, or the result has no columns.
|
|
|
|
CREATE TABLE bububu(a int) \gdesc
|
|
|
|
The command has no result, or the result has no columns.
|
|
|
|
-- subject command should not have executed
|
|
|
|
TABLE bububu; -- fail
|
|
|
|
ERROR: relation "bububu" does not exist
|
|
|
|
LINE 1: TABLE bububu;
|
|
|
|
^
|
|
|
|
-- query buffer should remain unchanged
|
|
|
|
SELECT 1 AS x, 'Hello', 2 AS y, true AS "dirty\name"
|
|
|
|
\gdesc
|
|
|
|
Column | Type
|
|
|
|
------------+---------
|
|
|
|
x | integer
|
|
|
|
?column? | text
|
|
|
|
y | integer
|
|
|
|
dirty\name | boolean
|
|
|
|
(4 rows)
|
|
|
|
|
|
|
|
\g
|
|
|
|
x | ?column? | y | dirty\name
|
|
|
|
---+----------+---+------------
|
|
|
|
1 | Hello | 2 | t
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
-- all on one line
|
|
|
|
SELECT 3 AS x, 'Hello', 4 AS y, true AS "dirty\name" \gdesc \g
|
|
|
|
Column | Type
|
|
|
|
------------+---------
|
|
|
|
x | integer
|
|
|
|
?column? | text
|
|
|
|
y | integer
|
|
|
|
dirty\name | boolean
|
|
|
|
(4 rows)
|
|
|
|
|
|
|
|
x | ?column? | y | dirty\name
|
|
|
|
---+----------+---+------------
|
|
|
|
3 | Hello | 4 | t
|
|
|
|
(1 row)
|
|
|
|
|
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
|
|
|
-- \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
|
2018-11-26 21:18:55 +01:00
|
|
|
csv_fieldsep ','
|
2014-10-19 03:58:17 +02:00
|
|
|
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
|
2018-11-26 18:41:42 +01:00
|
|
|
-- in aligned, unaligned, and wrapped formats
|
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
|
2018-11-26 18:41:42 +01:00
|
|
|
\pset border 1
|
|
|
|
-- support table for output-format tests (useful to create a footer)
|
|
|
|
create table psql_serial_tab (id serial);
|
|
|
|
-- test header/footer/tuples_only behavior in aligned/unaligned/wrapped cases
|
|
|
|
\pset format aligned
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
|
|
|
|
---------+-------+---------+------------+-----------+---------+-------
|
|
|
|
integer | 1 | 1 | 2147483647 | 1 | no | 1
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
pg_catalog | exp | double precision | double precision | func
|
|
|
|
pg_catalog | exp | numeric | numeric | func
|
|
|
|
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
-[ RECORD 1 ]---------
|
|
|
|
Type | integer
|
|
|
|
Start | 1
|
|
|
|
Minimum | 1
|
|
|
|
Maximum | 2147483647
|
|
|
|
Increment | 1
|
|
|
|
Cycles? | no
|
|
|
|
Cache | 1
|
|
|
|
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
Schema | pg_catalog
|
|
|
|
Name | exp
|
|
|
|
Result data type | double precision
|
|
|
|
Argument data types | double precision
|
|
|
|
Type | func
|
|
|
|
--------------------+-----------------
|
|
|
|
Schema | pg_catalog
|
|
|
|
Name | exp
|
|
|
|
Result data type | numeric
|
|
|
|
Argument data types | numeric
|
|
|
|
Type | func
|
|
|
|
|
|
|
|
\pset tuples_only false
|
|
|
|
-- empty table is a special case for this format
|
|
|
|
select 1 where false;
|
|
|
|
(0 rows)
|
|
|
|
|
|
|
|
\pset format unaligned
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
Type|Start|Minimum|Maximum|Increment|Cycles?|Cache
|
|
|
|
integer|1|1|2147483647|1|no|1
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
pg_catalog|exp|double precision|double precision|func
|
|
|
|
pg_catalog|exp|numeric|numeric|func
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
|
|
|
|
Type|integer
|
|
|
|
Start|1
|
|
|
|
Minimum|1
|
|
|
|
Maximum|2147483647
|
|
|
|
Increment|1
|
|
|
|
Cycles?|no
|
|
|
|
Cache|1
|
|
|
|
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
Schema|pg_catalog
|
|
|
|
Name|exp
|
|
|
|
Result data type|double precision
|
|
|
|
Argument data types|double precision
|
|
|
|
Type|func
|
|
|
|
|
|
|
|
Schema|pg_catalog
|
|
|
|
Name|exp
|
|
|
|
Result data type|numeric
|
|
|
|
Argument data types|numeric
|
|
|
|
Type|func
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset format wrapped
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
Type | Start | Minimum | Maximum | Increment | Cycles? | Cache
|
|
|
|
---------+-------+---------+------------+-----------+---------+-------
|
|
|
|
integer | 1 | 1 | 2147483647 | 1 | no | 1
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
pg_catalog | exp | double precision | double precision | func
|
|
|
|
pg_catalog | exp | numeric | numeric | func
|
|
|
|
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
-[ RECORD 1 ]---------
|
|
|
|
Type | integer
|
|
|
|
Start | 1
|
|
|
|
Minimum | 1
|
|
|
|
Maximum | 2147483647
|
|
|
|
Increment | 1
|
|
|
|
Cycles? | no
|
|
|
|
Cache | 1
|
|
|
|
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
Schema | pg_catalog
|
|
|
|
Name | exp
|
|
|
|
Result data type | double precision
|
|
|
|
Argument data types | double precision
|
|
|
|
Type | func
|
|
|
|
--------------------+-----------------
|
|
|
|
Schema | pg_catalog
|
|
|
|
Name | exp
|
|
|
|
Result data type | numeric
|
|
|
|
Argument data types | numeric
|
|
|
|
Type | func
|
|
|
|
|
|
|
|
\pset tuples_only false
|
tableam: introduce table AM infrastructure.
This introduces the concept of table access methods, i.e. CREATE
ACCESS METHOD ... TYPE TABLE and
CREATE TABLE ... USING (storage-engine).
No table access functionality is delegated to table AMs as of this
commit, that'll be done in following commits.
Subsequent commits will incrementally abstract table access
functionality to be routed through table access methods. That change
is too large to be reviewed & committed at once, so it'll be done
incrementally.
Docs will be updated at the end, as adding them incrementally would
likely make them less coherent, and definitely is a lot more work,
without a lot of benefit.
Table access methods are specified similar to index access methods,
i.e. pg_am.amhandler returns, as INTERNAL, a pointer to a struct with
callbacks. In contrast to index AMs that struct needs to live as long
as a backend, typically that's achieved by just returning a pointer to
a constant struct.
Psql's \d+ now displays a table's access method. That can be disabled
with HIDE_TABLEAM=true, which is mainly useful so regression tests can
be run against different AMs. It's quite possible that this behaviour
still needs to be fine tuned.
For now it's not allowed to set a table AM for a partitioned table, as
we've not resolved how partitions would inherit that. Disallowing
allows us to introduce, if we decide that's the way forward, such a
behaviour without a compatibility break.
Catversion bumped, to add the heap table AM and references to it.
Author: Haribabu Kommi, Andres Freund, Alvaro Herrera, Dimitri Golgov and others
Discussion:
https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
https://postgr.es/m/20160812231527.GA690404@alvherre.pgsql
https://postgr.es/m/20190107235616.6lur25ph22u5u5av@alap3.anarazel.de
https://postgr.es/m/20190304234700.w5tmhducs5wxgzls@alap3.anarazel.de
2019-03-06 18:54:38 +01:00
|
|
|
-- check conditional tableam display
|
|
|
|
-- Create a heap2 table am handler with heapam handler
|
|
|
|
CREATE ACCESS METHOD heap_psql TYPE TABLE HANDLER heap_tableam_handler;
|
|
|
|
CREATE TABLE tbl_heap_psql(f1 int, f2 char(100)) using heap_psql;
|
|
|
|
CREATE TABLE tbl_heap(f1 int, f2 char(100)) using heap;
|
|
|
|
\d+ tbl_heap_psql
|
|
|
|
Table "public.tbl_heap_psql"
|
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
|
|
|
|
--------+----------------+-----------+----------+---------+----------+--------------+-------------
|
|
|
|
f1 | integer | | | | plain | |
|
|
|
|
f2 | character(100) | | | | extended | |
|
|
|
|
|
|
|
|
\d+ tbl_heap
|
|
|
|
Table "public.tbl_heap"
|
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
|
|
|
|
--------+----------------+-----------+----------+---------+----------+--------------+-------------
|
|
|
|
f1 | integer | | | | plain | |
|
|
|
|
f2 | character(100) | | | | extended | |
|
|
|
|
|
|
|
|
\set HIDE_TABLEAM off
|
|
|
|
\d+ tbl_heap_psql
|
|
|
|
Table "public.tbl_heap_psql"
|
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
|
|
|
|
--------+----------------+-----------+----------+---------+----------+--------------+-------------
|
|
|
|
f1 | integer | | | | plain | |
|
|
|
|
f2 | character(100) | | | | extended | |
|
|
|
|
Access method: heap_psql
|
|
|
|
|
|
|
|
\d+ tbl_heap
|
|
|
|
Table "public.tbl_heap"
|
|
|
|
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
|
|
|
|
--------+----------------+-----------+----------+---------+----------+--------------+-------------
|
|
|
|
f1 | integer | | | | plain | |
|
|
|
|
f2 | character(100) | | | | extended | |
|
|
|
|
Access method: heap
|
|
|
|
|
|
|
|
\set HIDE_TABLEAM on
|
|
|
|
DROP TABLE tbl_heap, tbl_heap_psql;
|
|
|
|
DROP ACCESS METHOD heap_psql;
|
2018-11-26 21:30:11 +01:00
|
|
|
-- test numericlocale (as best we can without control of psql's locale)
|
2018-11-26 18:41:42 +01:00
|
|
|
\pset format aligned
|
|
|
|
\pset expanded off
|
|
|
|
\pset numericlocale true
|
2018-11-26 21:30:11 +01:00
|
|
|
select n, -n as m, n * 111 as x, '1e90'::float8 as f
|
2018-11-26 18:41:42 +01:00
|
|
|
from generate_series(0,3) n;
|
2018-11-26 21:30:11 +01:00
|
|
|
n | m | x | f
|
|
|
|
---+----+-----+-------
|
|
|
|
0 | 0 | 0 | 1e+90
|
|
|
|
1 | -1 | 111 | 1e+90
|
|
|
|
2 | -2 | 222 | 1e+90
|
|
|
|
3 | -3 | 333 | 1e+90
|
2018-11-26 18:41:42 +01:00
|
|
|
(4 rows)
|
|
|
|
|
|
|
|
\pset numericlocale false
|
|
|
|
-- test asciidoc output format
|
2015-03-31 17:33:25 +02:00
|
|
|
\pset format asciidoc
|
2018-11-26 18:41:42 +01:00
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
|
|
|
|
.Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
[options="header",cols="<l,>l,>l,>l,>l,<l,>l",frame="none"]
|
|
|
|
|====
|
|
|
|
^l|Type ^l|Start ^l|Minimum ^l|Maximum ^l|Increment ^l|Cycles? ^l|Cache
|
|
|
|
|integer |1 |1 |2147483647 |1 |no |1
|
|
|
|
|====
|
|
|
|
|
|
|
|
....
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
....
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
|
|
|
|
[cols="<l,<l,<l,<l,<l",frame="none"]
|
|
|
|
|====
|
|
|
|
|pg_catalog |exp |double precision |double precision |func
|
|
|
|
|pg_catalog |exp |numeric |numeric |func
|
|
|
|
|====
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
|
|
|
|
.Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
[cols="h,l",frame="none"]
|
|
|
|
|====
|
|
|
|
2+^|Record 1
|
|
|
|
<l|Type <l|integer
|
|
|
|
<l|Start >l|1
|
|
|
|
<l|Minimum >l|1
|
|
|
|
<l|Maximum >l|2147483647
|
|
|
|
<l|Increment >l|1
|
|
|
|
<l|Cycles? <l|no
|
|
|
|
<l|Cache >l|1
|
|
|
|
|====
|
|
|
|
|
|
|
|
....
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
....
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
|
|
|
|
[cols="h,l",frame="none"]
|
|
|
|
|====
|
|
|
|
2+|
|
|
|
|
<l|Schema <l|pg_catalog
|
|
|
|
<l|Name <l|exp
|
|
|
|
<l|Result data type <l|double precision
|
|
|
|
<l|Argument data types <l|double precision
|
|
|
|
<l|Type <l|func
|
|
|
|
2+|
|
|
|
|
<l|Schema <l|pg_catalog
|
|
|
|
<l|Name <l|exp
|
|
|
|
<l|Result data type <l|numeric
|
|
|
|
<l|Argument data types <l|numeric
|
|
|
|
<l|Type <l|func
|
|
|
|
|====
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
|
|
|
select 'some|text' as "a|title", ' ' as "empty ", n as int
|
|
|
|
from generate_series(1,2) as n;
|
2015-03-31 17:33:25 +02:00
|
|
|
\pset expanded off
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[options="header",cols="<l,<l,>l",frame="none",grid="none"]
|
|
|
|
|====
|
2018-11-26 18:41:42 +01:00
|
|
|
^l|a\|title ^l|empty ^l|int
|
|
|
|
|some\|text | |1
|
|
|
|
|some\|text | |2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
|
|
|
|
....
|
2018-11-26 18:41:42 +01:00
|
|
|
(2 rows)
|
2015-03-31 17:33:25 +02:00
|
|
|
....
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[options="header",cols="<l,<l,>l",frame="none"]
|
|
|
|
|====
|
2018-11-26 18:41:42 +01:00
|
|
|
^l|a\|title ^l|empty ^l|int
|
|
|
|
|some\|text | |1
|
|
|
|
|some\|text | |2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
|
|
|
|
....
|
2018-11-26 18:41:42 +01:00
|
|
|
(2 rows)
|
2015-03-31 17:33:25 +02:00
|
|
|
....
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[options="header",cols="<l,<l,>l",frame="all",grid="all"]
|
|
|
|
|====
|
2018-11-26 18:41:42 +01:00
|
|
|
^l|a\|title ^l|empty ^l|int
|
|
|
|
|some\|text | |1
|
|
|
|
|some\|text | |2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
|
|
|
|
....
|
2018-11-26 18:41:42 +01:00
|
|
|
(2 rows)
|
2015-03-31 17:33:25 +02:00
|
|
|
....
|
|
|
|
\pset expanded on
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[cols="h,l",frame="none",grid="none"]
|
|
|
|
|====
|
|
|
|
2+^|Record 1
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|1
|
2015-03-31 17:33:25 +02:00
|
|
|
2+^|Record 2
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[cols="h,l",frame="none"]
|
|
|
|
|====
|
|
|
|
2+^|Record 1
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|1
|
2015-03-31 17:33:25 +02:00
|
|
|
2+^|Record 2
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
|
|
|
|
[cols="h,l",frame="all",grid="all"]
|
|
|
|
|====
|
|
|
|
2+^|Record 1
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|1
|
2015-03-31 17:33:25 +02:00
|
|
|
2+^|Record 2
|
2018-11-26 18:41:42 +01:00
|
|
|
<l|a\|title <l|some\|text
|
|
|
|
<l|empty <l|
|
|
|
|
<l|int >l|2
|
2015-03-31 17:33:25 +02:00
|
|
|
|====
|
|
|
|
deallocate q;
|
2018-11-26 21:18:55 +01:00
|
|
|
-- test csv output format
|
|
|
|
\pset format csv
|
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Type,Start,Minimum,Maximum,Increment,Cycles?,Cache
|
|
|
|
integer,1,1,2147483647,1,no,1
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
pg_catalog,exp,double precision,double precision,func
|
|
|
|
pg_catalog,exp,numeric,numeric,func
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
Type,integer
|
|
|
|
Start,1
|
|
|
|
Minimum,1
|
|
|
|
Maximum,2147483647
|
|
|
|
Increment,1
|
|
|
|
Cycles?,no
|
|
|
|
Cache,1
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
Schema,pg_catalog
|
|
|
|
Name,exp
|
|
|
|
Result data type,double precision
|
|
|
|
Argument data types,double precision
|
|
|
|
Type,func
|
|
|
|
Schema,pg_catalog
|
|
|
|
Name,exp
|
|
|
|
Result data type,numeric
|
|
|
|
Argument data types,numeric
|
|
|
|
Type,func
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
|
|
|
select 'some"text' as "a""title", E' <foo>\n<bar>' as "junk",
|
|
|
|
' ' as "empty", n as int
|
|
|
|
from generate_series(1,2) as n;
|
|
|
|
\pset expanded off
|
|
|
|
execute q;
|
|
|
|
"a""title",junk,empty,int
|
|
|
|
"some""text"," <foo>
|
|
|
|
<bar>", ,1
|
|
|
|
"some""text"," <foo>
|
|
|
|
<bar>", ,2
|
|
|
|
\pset expanded on
|
|
|
|
execute q;
|
|
|
|
"a""title","some""text"
|
|
|
|
junk," <foo>
|
|
|
|
<bar>"
|
|
|
|
empty,
|
|
|
|
int,1
|
|
|
|
"a""title","some""text"
|
|
|
|
junk," <foo>
|
|
|
|
<bar>"
|
|
|
|
empty,
|
|
|
|
int,2
|
|
|
|
deallocate q;
|
|
|
|
-- special cases
|
|
|
|
\pset expanded off
|
|
|
|
select 'comma,comma' as comma, 'semi;semi' as semi;
|
|
|
|
comma,semi
|
|
|
|
"comma,comma",semi;semi
|
|
|
|
\pset csv_fieldsep ';'
|
|
|
|
select 'comma,comma' as comma, 'semi;semi' as semi;
|
|
|
|
comma;semi
|
|
|
|
comma,comma;"semi;semi"
|
|
|
|
select '\.' as data;
|
|
|
|
data
|
|
|
|
"\."
|
|
|
|
\pset csv_fieldsep '.'
|
|
|
|
select '\' as d1, '' as d2;
|
|
|
|
"d1"."d2"
|
|
|
|
"\".""
|
|
|
|
-- illegal csv separators
|
|
|
|
\pset csv_fieldsep ''
|
|
|
|
\pset: csv_fieldsep must be a single one-byte character
|
|
|
|
\pset csv_fieldsep '\0'
|
|
|
|
\pset: csv_fieldsep must be a single one-byte character
|
|
|
|
\pset csv_fieldsep '\n'
|
|
|
|
\pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
|
|
|
|
\pset csv_fieldsep '\r'
|
|
|
|
\pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
|
|
|
|
\pset csv_fieldsep '"'
|
|
|
|
\pset: csv_fieldsep cannot be a double quote, a newline, or a carriage return
|
|
|
|
\pset csv_fieldsep ',,'
|
|
|
|
\pset: csv_fieldsep must be a single one-byte character
|
|
|
|
\pset csv_fieldsep ','
|
2018-11-26 18:41:42 +01:00
|
|
|
-- test html output format
|
|
|
|
\pset format html
|
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
<table border="1">
|
|
|
|
<caption>Sequence "public.psql_serial_tab_id_seq"</caption>
|
|
|
|
<tr>
|
|
|
|
<th align="center">Type</th>
|
|
|
|
<th align="center">Start</th>
|
|
|
|
<th align="center">Minimum</th>
|
|
|
|
<th align="center">Maximum</th>
|
|
|
|
<th align="center">Increment</th>
|
|
|
|
<th align="center">Cycles?</th>
|
|
|
|
<th align="center">Cache</th>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">integer</td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
<td align="right">2147483647</td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
<td align="left">no</td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<p>Owned by: public.psql_serial_tab.id<br />
|
|
|
|
</p>
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
<table border="1">
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">pg_catalog</td>
|
|
|
|
<td align="left">exp</td>
|
|
|
|
<td align="left">double precision</td>
|
|
|
|
<td align="left">double precision</td>
|
|
|
|
<td align="left">func</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">pg_catalog</td>
|
|
|
|
<td align="left">exp</td>
|
|
|
|
<td align="left">numeric</td>
|
|
|
|
<td align="left">numeric</td>
|
|
|
|
<td align="left">func</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
<table border="1">
|
|
|
|
<caption>Sequence "public.psql_serial_tab_id_seq"</caption>
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 1</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Type</th>
|
|
|
|
<td align="left">integer</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Start</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Minimum</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Maximum</th>
|
|
|
|
<td align="right">2147483647</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Increment</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Cycles?</th>
|
|
|
|
<td align="left">no</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Cache</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<p>Owned by: public.psql_serial_tab.id<br />
|
|
|
|
</p>
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
<table border="1">
|
|
|
|
|
|
|
|
<tr><td colspan="2"> </td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Schema</th>
|
|
|
|
<td align="left">pg_catalog</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Name</th>
|
|
|
|
<td align="left">exp</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Result data type</th>
|
|
|
|
<td align="left">double precision</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Argument data types</th>
|
|
|
|
<td align="left">double precision</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Type</th>
|
|
|
|
<td align="left">func</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr><td colspan="2"> </td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Schema</th>
|
|
|
|
<td align="left">pg_catalog</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Name</th>
|
|
|
|
<td align="left">exp</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Result data type</th>
|
|
|
|
<td align="left">numeric</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Argument data types</th>
|
|
|
|
<td align="left">numeric</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>Type</th>
|
|
|
|
<td align="left">func</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
|
|
|
select 'some"text' as "a&title", E' <foo>\n<bar>' as "junk",
|
|
|
|
' ' as "empty", n as int
|
|
|
|
from generate_series(1,2) as n;
|
|
|
|
\pset expanded off
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
<table border="0">
|
|
|
|
<tr>
|
|
|
|
<th align="center">a&title</th>
|
|
|
|
<th align="center">junk</th>
|
|
|
|
<th align="center">empty</th>
|
|
|
|
<th align="center">int</th>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<p>(2 rows)<br />
|
|
|
|
</p>
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
<table border="1">
|
|
|
|
<tr>
|
|
|
|
<th align="center">a&title</th>
|
|
|
|
<th align="center">junk</th>
|
|
|
|
<th align="center">empty</th>
|
|
|
|
<th align="center">int</th>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<p>(2 rows)<br />
|
|
|
|
</p>
|
|
|
|
\pset tableattr foobar
|
|
|
|
execute q;
|
|
|
|
<table border="1" foobar>
|
|
|
|
<tr>
|
|
|
|
<th align="center">a&title</th>
|
|
|
|
<th align="center">junk</th>
|
|
|
|
<th align="center">empty</th>
|
|
|
|
<th align="center">int</th>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
<td align="left"> </td>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<p>(2 rows)<br />
|
|
|
|
</p>
|
|
|
|
\pset tableattr
|
|
|
|
\pset expanded on
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
<table border="0">
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 1</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 2</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
<table border="1">
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 1</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 2</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
\pset tableattr foobar
|
|
|
|
execute q;
|
|
|
|
<table border="1" foobar>
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 1</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">1</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr><td colspan="2" align="center">Record 2</td></tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>a&title</th>
|
|
|
|
<td align="left">some"text</td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>junk</th>
|
|
|
|
<td align="left"> <foo><br />
|
|
|
|
<bar></td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>empty</th>
|
|
|
|
<td align="left"> </td>
|
|
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
|
|
<th>int</th>
|
|
|
|
<td align="right">2</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
\pset tableattr
|
|
|
|
deallocate q;
|
|
|
|
-- test latex output format
|
|
|
|
\pset format latex
|
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
\begin{center}
|
|
|
|
Sequence "public.psql\_serial\_tab\_id\_seq"
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
\begin{tabular}{l | r | r | r | r | l | r}
|
|
|
|
\textit{Type} & \textit{Start} & \textit{Minimum} & \textit{Maximum} & \textit{Increment} & \textit{Cycles?} & \textit{Cache} \\
|
|
|
|
\hline
|
|
|
|
integer & 1 & 1 & 2147483647 & 1 & no & 1 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent Owned by: public.psql\_serial\_tab.id \\
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
\begin{tabular}{l | l | l | l | l}
|
|
|
|
pg\_catalog & exp & double precision & double precision & func \\
|
|
|
|
pg\_catalog & exp & numeric & numeric & func \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
\begin{center}
|
|
|
|
Sequence "public.psql\_serial\_tab\_id\_seq"
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
|
|
|
\hline
|
|
|
|
Type & integer \\
|
|
|
|
Start & 1 \\
|
|
|
|
Minimum & 1 \\
|
|
|
|
Maximum & 2147483647 \\
|
|
|
|
Increment & 1 \\
|
|
|
|
Cycles? & no \\
|
|
|
|
Cache & 1 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent Owned by: public.psql\_serial\_tab.id \\
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\hline
|
|
|
|
Schema & pg\_catalog \\
|
|
|
|
Name & exp \\
|
|
|
|
Result data type & double precision \\
|
|
|
|
Argument data types & double precision \\
|
|
|
|
Type & func \\
|
|
|
|
\hline
|
|
|
|
Schema & pg\_catalog \\
|
|
|
|
Name & exp \\
|
|
|
|
Result data type & numeric \\
|
|
|
|
Argument data types & numeric \\
|
|
|
|
Type & func \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
2018-11-26 23:32:51 +01:00
|
|
|
select 'some\more_text' as "a$title", E' #<foo>%&^~|\n{bar}' as "junk",
|
2018-11-26 18:41:42 +01:00
|
|
|
' ' as "empty", n as int
|
|
|
|
from generate_series(1,2) as n;
|
|
|
|
\pset expanded off
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{lllr}
|
|
|
|
\textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
|
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
|
2018-11-26 18:41:42 +01:00
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent (2 rows) \\
|
|
|
|
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{l | l | l | r}
|
|
|
|
\textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
|
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
|
2018-11-26 18:41:42 +01:00
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent (2 rows) \\
|
|
|
|
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{| l | l | l | r |}
|
|
|
|
\hline
|
|
|
|
\textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
|
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
|
2018-11-26 18:41:42 +01:00
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent (2 rows) \\
|
|
|
|
|
|
|
|
\pset border 3
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{| l | l | l | r |}
|
|
|
|
\hline
|
|
|
|
\textit{a\$title} & \textit{junk} & \textit{empty} & \textit{int} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 1 \\
|
2018-11-26 18:41:42 +01:00
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
some\textbackslash{}more\_text & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} & & 2 \\
|
2018-11-26 18:41:42 +01:00
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent (2 rows) \\
|
|
|
|
|
|
|
|
\pset expanded on
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{cl}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\multicolumn{2}{c}{\textit{Record 2}} \\
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\multicolumn{2}{c}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{|c|l|}
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 3
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{|c|l|}
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
deallocate q;
|
|
|
|
-- test latex-longtable output format
|
|
|
|
\pset format latex-longtable
|
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
\begin{longtable}{l | r | r | r | r | l | r}
|
|
|
|
\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}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\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}} \\
|
|
|
|
\midrule
|
|
|
|
\endhead
|
|
|
|
\caption[Sequence "public.psql\_serial\_tab\_id\_seq" (Continued)]{Sequence "public.psql\_serial\_tab\_id\_seq"}
|
|
|
|
\endfoot
|
|
|
|
\caption[Sequence "public.psql\_serial\_tab\_id\_seq"]{Sequence "public.psql\_serial\_tab\_id\_seq"}
|
|
|
|
\endlastfoot
|
|
|
|
\raggedright{integer}
|
|
|
|
&
|
|
|
|
\raggedright{1}
|
|
|
|
&
|
|
|
|
\raggedright{1}
|
|
|
|
&
|
|
|
|
\raggedright{2147483647}
|
|
|
|
&
|
|
|
|
\raggedright{1}
|
|
|
|
&
|
|
|
|
\raggedright{no}
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
|
|
|
\end{longtable}
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
\begin{longtable}{l | l | l | l | l}
|
|
|
|
\raggedright{pg\_catalog}
|
|
|
|
&
|
|
|
|
\raggedright{exp}
|
|
|
|
&
|
|
|
|
\raggedright{double precision}
|
|
|
|
&
|
|
|
|
\raggedright{double precision}
|
|
|
|
&
|
|
|
|
\raggedright{func} \tabularnewline
|
|
|
|
\raggedright{pg\_catalog}
|
|
|
|
&
|
|
|
|
\raggedright{exp}
|
|
|
|
&
|
|
|
|
\raggedright{numeric}
|
|
|
|
&
|
|
|
|
\raggedright{numeric}
|
|
|
|
&
|
|
|
|
\raggedright{func} \tabularnewline
|
|
|
|
\end{longtable}
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
\begin{center}
|
|
|
|
Sequence "public.psql\_serial\_tab\_id\_seq"
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
|
|
|
\hline
|
|
|
|
Type & integer \\
|
|
|
|
Start & 1 \\
|
|
|
|
Minimum & 1 \\
|
|
|
|
Maximum & 2147483647 \\
|
|
|
|
Increment & 1 \\
|
|
|
|
Cycles? & no \\
|
|
|
|
Cache & 1 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent Owned by: public.psql\_serial\_tab.id \\
|
|
|
|
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\hline
|
|
|
|
Schema & pg\_catalog \\
|
|
|
|
Name & exp \\
|
|
|
|
Result data type & double precision \\
|
|
|
|
Argument data types & double precision \\
|
|
|
|
Type & func \\
|
|
|
|
\hline
|
|
|
|
Schema & pg\_catalog \\
|
|
|
|
Name & exp \\
|
|
|
|
Result data type & numeric \\
|
|
|
|
Argument data types & numeric \\
|
|
|
|
Type & func \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
2018-11-26 23:32:51 +01:00
|
|
|
select 'some\more_text' as "a$title", E' #<foo>%&^~|\n{bar}' as "junk",
|
2018-11-26 18:41:42 +01:00
|
|
|
' ' as "empty", n as int
|
|
|
|
from generate_series(1,2) as n;
|
|
|
|
\pset expanded off
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
\begin{longtable}{lllr}
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endhead
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{2} \tabularnewline
|
|
|
|
\end{longtable}
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
\begin{longtable}{l | l | l | r}
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endhead
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{2} \tabularnewline
|
|
|
|
\end{longtable}
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
\begin{longtable}{| l | l | l | r |}
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endhead
|
|
|
|
\bottomrule
|
|
|
|
\endfoot
|
|
|
|
\bottomrule
|
|
|
|
\endlastfoot
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{2} \tabularnewline
|
|
|
|
\end{longtable}
|
|
|
|
\pset border 3
|
|
|
|
execute q;
|
|
|
|
\begin{longtable}{| l | l | l | r |}
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\endhead
|
|
|
|
\bottomrule
|
|
|
|
\endfoot
|
|
|
|
\bottomrule
|
|
|
|
\endlastfoot
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{2} \tabularnewline
|
|
|
|
\hline
|
|
|
|
\end{longtable}
|
|
|
|
\pset tableattr lr
|
|
|
|
execute q;
|
|
|
|
\begin{longtable}{| p{lr\textwidth} | p{lr\textwidth} | p{lr\textwidth} | r |}
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\midrule
|
|
|
|
\endfirsthead
|
|
|
|
\toprule
|
|
|
|
\small\textbf{\textit{a\$title}} & \small\textbf{\textit{junk}} & \small\textbf{\textit{empty}} & \small\textbf{\textit{int}} \\
|
|
|
|
\endhead
|
|
|
|
\bottomrule
|
|
|
|
\endfoot
|
|
|
|
\bottomrule
|
|
|
|
\endlastfoot
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{1} \tabularnewline
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{some\textbackslash{}more\_text}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
2018-11-26 23:32:51 +01:00
|
|
|
\raggedright{ \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\}}
|
2018-11-26 18:41:42 +01:00
|
|
|
&
|
|
|
|
\raggedright{ }
|
|
|
|
&
|
|
|
|
\raggedright{2} \tabularnewline
|
|
|
|
\hline
|
|
|
|
\end{longtable}
|
|
|
|
\pset tableattr
|
|
|
|
\pset expanded on
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{cl}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\multicolumn{2}{c}{\textit{Record 2}} \\
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{c|l}
|
|
|
|
\multicolumn{2}{c}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\multicolumn{2}{c}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{|c|l|}
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset border 3
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{|c|l|}
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset tableattr lr
|
|
|
|
execute q;
|
|
|
|
\begin{tabular}{|c|l|}
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 1}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 1 \\
|
|
|
|
\hline
|
|
|
|
\multicolumn{2}{|c|}{\textit{Record 2}} \\
|
|
|
|
\hline
|
2018-11-26 23:32:51 +01:00
|
|
|
a\$title & some\textbackslash{}more\_text \\
|
|
|
|
junk & \#\textless{}foo\textgreater{}\%\&\^{}\~{}\textbar{}\\\{bar\} \\
|
2018-11-26 18:41:42 +01:00
|
|
|
empty & \\
|
|
|
|
int & 2 \\
|
|
|
|
\hline
|
|
|
|
\end{tabular}
|
|
|
|
|
|
|
|
\noindent
|
|
|
|
\pset tableattr
|
|
|
|
deallocate q;
|
|
|
|
-- test troff-ms output format
|
|
|
|
\pset format troff-ms
|
|
|
|
\pset border 1
|
|
|
|
\pset expanded off
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
.LP
|
|
|
|
.DS C
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
.DE
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
l | r | r | r | r | l | r.
|
|
|
|
\fIType\fP \fIStart\fP \fIMinimum\fP \fIMaximum\fP \fIIncrement\fP \fICycles?\fP \fICache\fP
|
|
|
|
_
|
|
|
|
integer 1 1 2147483647 1 no 1
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
.DE
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
l | l | l | l | l.
|
|
|
|
pg_catalog exp double precision double precision func
|
|
|
|
pg_catalog exp numeric numeric func
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
.DE
|
|
|
|
\pset tuples_only false
|
|
|
|
\pset expanded on
|
|
|
|
\d psql_serial_tab_id_seq
|
|
|
|
.LP
|
|
|
|
.DS C
|
|
|
|
Sequence "public.psql_serial_tab_id_seq"
|
|
|
|
.DE
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
c s.
|
|
|
|
\fIRecord 1\fP
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c | l.
|
|
|
|
Type integer
|
|
|
|
Start 1
|
|
|
|
Minimum 1
|
|
|
|
Maximum 2147483647
|
|
|
|
Increment 1
|
|
|
|
Cycles? no
|
|
|
|
Cache 1
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
Owned by: public.psql_serial_tab.id
|
|
|
|
.DE
|
|
|
|
\pset tuples_only true
|
|
|
|
\df exp
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
c l;
|
|
|
|
_
|
|
|
|
Schema pg_catalog
|
|
|
|
Name exp
|
|
|
|
Result data type double precision
|
|
|
|
Argument data types double precision
|
|
|
|
Type func
|
|
|
|
_
|
|
|
|
Schema pg_catalog
|
|
|
|
Name exp
|
|
|
|
Result data type numeric
|
|
|
|
Argument data types numeric
|
|
|
|
Type func
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
.DE
|
|
|
|
\pset tuples_only false
|
|
|
|
prepare q as
|
|
|
|
select 'some\text' as "a\title", E' <foo>\n<bar>' as "junk",
|
|
|
|
' ' as "empty", n as int
|
|
|
|
from generate_series(1,2) as n;
|
|
|
|
\pset expanded off
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
lllr.
|
|
|
|
\fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
|
|
|
|
_
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 1
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
(2 rows)
|
|
|
|
.DE
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
l | l | l | r.
|
|
|
|
\fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
|
|
|
|
_
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 1
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
(2 rows)
|
|
|
|
.DE
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center box;
|
|
|
|
l | l | l | r.
|
|
|
|
\fIa\(rstitle\fP \fIjunk\fP \fIempty\fP \fIint\fP
|
|
|
|
_
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 1
|
|
|
|
some\(rstext <foo>
|
|
|
|
<bar> 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
(2 rows)
|
|
|
|
.DE
|
|
|
|
\pset expanded on
|
|
|
|
\pset border 0
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
c s.
|
|
|
|
\fIRecord 1\fP
|
|
|
|
.T&
|
|
|
|
c l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 1
|
|
|
|
.T&
|
|
|
|
c s.
|
|
|
|
\fIRecord 2\fP
|
|
|
|
.T&
|
|
|
|
c l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
.DE
|
|
|
|
\pset border 1
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center;
|
|
|
|
c s.
|
|
|
|
\fIRecord 1\fP
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c | l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 1
|
|
|
|
.T&
|
|
|
|
c s.
|
|
|
|
\fIRecord 2\fP
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c | l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
.DE
|
|
|
|
\pset border 2
|
|
|
|
execute q;
|
|
|
|
.LP
|
|
|
|
.TS
|
|
|
|
center box;
|
|
|
|
c s.
|
|
|
|
\fIRecord 1\fP
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 1
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c s.
|
|
|
|
\fIRecord 2\fP
|
|
|
|
_
|
|
|
|
.T&
|
|
|
|
c l.
|
|
|
|
a\(rstitle some\(rstext
|
|
|
|
junk <foo>
|
|
|
|
<bar>
|
|
|
|
empty
|
|
|
|
int 2
|
|
|
|
.TE
|
|
|
|
.DS L
|
|
|
|
.DE
|
|
|
|
deallocate q;
|
|
|
|
-- check ambiguous format requests
|
|
|
|
\pset format a
|
|
|
|
\pset: ambiguous abbreviation "a" matches both "aligned" and "asciidoc"
|
|
|
|
\pset format l
|
|
|
|
-- clean up after output format tests
|
|
|
|
drop table psql_serial_tab;
|
2016-04-09 01:23:18 +02:00
|
|
|
\pset format aligned
|
|
|
|
\pset expanded off
|
|
|
|
\pset border 1
|
Support \if ... \elif ... \else ... \endif in psql scripting.
This patch adds nestable conditional blocks to psql. The control
structure feature per se is complete, but the boolean expressions
understood by \if and \elif are pretty primitive; basically, after
variable substitution and backtick expansion, the result has to be
"true" or "false" or one of the other standard spellings of a boolean
value. But that's enough for many purposes, since you can always
do the heavy lifting on the server side; and we can extend it later.
Along the way, pay down some of the technical debt that had built up
around psql/command.c:
* Refactor exec_command() into a function per command, instead of
being a 1500-line monstrosity. This makes the file noticeably longer
because of repetitive function header/trailer overhead, but it seems
much more readable.
* Teach psql_get_variable() and psqlscanslash.l to suppress variable
substitution and backtick expansion on the basis of the conditional
stack state, thereby allowing removal of the OT_NO_EVAL kluge.
* Fix the no-doubt-once-expedient hack of sometimes silently substituting
mainloop.c's previous_buf for query_buf when calling HandleSlashCmds.
(It's a bit remarkable that commands like \r worked at all with that.)
Recall of a previous query is now done explicitly in the slash commands
where that should happen.
Corey Huinker, reviewed by Fabien Coelho, further hacking by me
Discussion: https://postgr.es/m/CADkLM=c94OSRTnat=LX0ivNq4pxDNeoomFfYvBKM5N_xfmLtAA@mail.gmail.com
2017-03-30 18:59:11 +02:00
|
|
|
-- tests for \if ... \endif
|
|
|
|
\if true
|
|
|
|
select 'okay';
|
|
|
|
?column?
|
|
|
|
----------
|
|
|
|
okay
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
select 'still okay';
|
|
|
|
?column?
|
|
|
|
------------
|
|
|
|
still okay
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
\else
|
|
|
|
not okay;
|
|
|
|
still not okay
|
|
|
|
\endif
|
|
|
|
-- at this point query buffer should still have last valid line
|
|
|
|
\g
|
|
|
|
?column?
|
|
|
|
------------
|
|
|
|
still okay
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
-- \if should work okay on part of a query
|
|
|
|
select
|
|
|
|
\if true
|
|
|
|
42
|
|
|
|
\else
|
|
|
|
(bogus
|
|
|
|
\endif
|
|
|
|
forty_two;
|
|
|
|
forty_two
|
|
|
|
-----------
|
|
|
|
42
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
select \if false \\ (bogus \else \\ 42 \endif \\ forty_two;
|
|
|
|
forty_two
|
|
|
|
-----------
|
|
|
|
42
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
-- test a large nested if using a variety of true-equivalents
|
|
|
|
\if true
|
|
|
|
\if 1
|
|
|
|
\if yes
|
|
|
|
\if on
|
|
|
|
\echo 'all true'
|
|
|
|
all true
|
|
|
|
\else
|
|
|
|
\echo 'should not print #1-1'
|
|
|
|
\endif
|
|
|
|
\else
|
|
|
|
\echo 'should not print #1-2'
|
|
|
|
\endif
|
|
|
|
\else
|
|
|
|
\echo 'should not print #1-3'
|
|
|
|
\endif
|
|
|
|
\else
|
|
|
|
\echo 'should not print #1-4'
|
|
|
|
\endif
|
|
|
|
-- test a variety of false-equivalents in an if/elif/else structure
|
|
|
|
\if false
|
|
|
|
\echo 'should not print #2-1'
|
|
|
|
\elif 0
|
|
|
|
\echo 'should not print #2-2'
|
|
|
|
\elif no
|
|
|
|
\echo 'should not print #2-3'
|
|
|
|
\elif off
|
|
|
|
\echo 'should not print #2-4'
|
|
|
|
\else
|
|
|
|
\echo 'all false'
|
|
|
|
all false
|
|
|
|
\endif
|
|
|
|
-- test simple true-then-else
|
|
|
|
\if true
|
|
|
|
\echo 'first thing true'
|
|
|
|
first thing true
|
|
|
|
\else
|
|
|
|
\echo 'should not print #3-1'
|
|
|
|
\endif
|
|
|
|
-- test simple false-true-else
|
|
|
|
\if false
|
|
|
|
\echo 'should not print #4-1'
|
|
|
|
\elif true
|
|
|
|
\echo 'second thing true'
|
|
|
|
second thing true
|
|
|
|
\else
|
|
|
|
\echo 'should not print #5-1'
|
|
|
|
\endif
|
|
|
|
-- invalid boolean expressions are false
|
|
|
|
\if invalid boolean expression
|
2017-09-11 17:20:47 +02:00
|
|
|
unrecognized value "invalid boolean expression" for "\if expression": Boolean expected
|
Support \if ... \elif ... \else ... \endif in psql scripting.
This patch adds nestable conditional blocks to psql. The control
structure feature per se is complete, but the boolean expressions
understood by \if and \elif are pretty primitive; basically, after
variable substitution and backtick expansion, the result has to be
"true" or "false" or one of the other standard spellings of a boolean
value. But that's enough for many purposes, since you can always
do the heavy lifting on the server side; and we can extend it later.
Along the way, pay down some of the technical debt that had built up
around psql/command.c:
* Refactor exec_command() into a function per command, instead of
being a 1500-line monstrosity. This makes the file noticeably longer
because of repetitive function header/trailer overhead, but it seems
much more readable.
* Teach psql_get_variable() and psqlscanslash.l to suppress variable
substitution and backtick expansion on the basis of the conditional
stack state, thereby allowing removal of the OT_NO_EVAL kluge.
* Fix the no-doubt-once-expedient hack of sometimes silently substituting
mainloop.c's previous_buf for query_buf when calling HandleSlashCmds.
(It's a bit remarkable that commands like \r worked at all with that.)
Recall of a previous query is now done explicitly in the slash commands
where that should happen.
Corey Huinker, reviewed by Fabien Coelho, further hacking by me
Discussion: https://postgr.es/m/CADkLM=c94OSRTnat=LX0ivNq4pxDNeoomFfYvBKM5N_xfmLtAA@mail.gmail.com
2017-03-30 18:59:11 +02:00
|
|
|
\echo 'will not print #6-1'
|
|
|
|
\else
|
|
|
|
\echo 'will print anyway #6-2'
|
|
|
|
will print anyway #6-2
|
|
|
|
\endif
|
|
|
|
-- test un-matched endif
|
|
|
|
\endif
|
|
|
|
\endif: no matching \if
|
|
|
|
-- test un-matched else
|
|
|
|
\else
|
|
|
|
\else: no matching \if
|
|
|
|
-- test un-matched elif
|
|
|
|
\elif
|
|
|
|
\elif: no matching \if
|
|
|
|
-- test double-else error
|
|
|
|
\if true
|
|
|
|
\else
|
|
|
|
\else
|
|
|
|
\else: cannot occur after \else
|
|
|
|
\endif
|
|
|
|
-- test elif out-of-order
|
|
|
|
\if false
|
|
|
|
\else
|
|
|
|
\elif
|
|
|
|
\elif: cannot occur after \else
|
|
|
|
\endif
|
|
|
|
-- test if-endif matching in a false branch
|
|
|
|
\if false
|
|
|
|
\if false
|
|
|
|
\echo 'should not print #7-1'
|
|
|
|
\else
|
|
|
|
\echo 'should not print #7-2'
|
|
|
|
\endif
|
|
|
|
\echo 'should not print #7-3'
|
|
|
|
\else
|
|
|
|
\echo 'should print #7-4'
|
|
|
|
should print #7-4
|
|
|
|
\endif
|
|
|
|
-- show that vars and backticks are not expanded when ignoring extra args
|
|
|
|
\set foo bar
|
|
|
|
\echo :foo :'foo' :"foo"
|
|
|
|
bar 'bar' "bar"
|
|
|
|
\pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
|
|
|
|
\pset: extra argument "nosuchcommand" ignored
|
|
|
|
\pset: extra argument ":foo" ignored
|
|
|
|
\pset: extra argument ":'foo'" ignored
|
|
|
|
\pset: extra argument ":"foo"" ignored
|
|
|
|
-- show that vars and backticks are not expanded and commands are ignored
|
|
|
|
-- when in a false if-branch
|
|
|
|
\set try_to_quit '\\q'
|
|
|
|
\if false
|
|
|
|
:try_to_quit
|
|
|
|
\echo `nosuchcommand` :foo :'foo' :"foo"
|
|
|
|
\pset fieldsep | `nosuchcommand` :foo :'foo' :"foo"
|
|
|
|
\a \C arg1 \c arg1 arg2 arg3 arg4 \cd arg1 \conninfo
|
|
|
|
\copy arg1 arg2 arg3 arg4 arg5 arg6
|
|
|
|
\copyright \dt arg1 \e arg1 arg2
|
|
|
|
\ef whole_line
|
|
|
|
\ev whole_line
|
|
|
|
\echo arg1 arg2 arg3 arg4 arg5 \echo arg1 \encoding arg1 \errverbose
|
|
|
|
\g arg1 \gx arg1 \gexec \h \html \i arg1 \ir arg1 \l arg1 \lo arg1 arg2
|
|
|
|
\o arg1 \p \password arg1 \prompt arg1 arg2 \pset arg1 arg2 \q
|
|
|
|
\reset \s arg1 \set arg1 arg2 arg3 arg4 arg5 arg6 arg7 \setenv arg1 arg2
|
|
|
|
\sf whole_line
|
|
|
|
\sv whole_line
|
|
|
|
\t arg1 \T arg1 \timing arg1 \unset arg1 \w arg1 \watch arg1 \x arg1
|
|
|
|
-- \else here is eaten as part of OT_FILEPIPE argument
|
|
|
|
\w |/no/such/file \else
|
|
|
|
-- \endif here is eaten as part of whole-line argument
|
|
|
|
\! whole_line \endif
|
|
|
|
\else
|
|
|
|
\echo 'should print #8-1'
|
|
|
|
should print #8-1
|
|
|
|
\endif
|
2017-09-22 01:02:23 +02:00
|
|
|
-- :{?...} defined variable test
|
|
|
|
\set i 1
|
|
|
|
\if :{?i}
|
|
|
|
\echo '#9-1 ok, variable i is defined'
|
|
|
|
#9-1 ok, variable i is defined
|
|
|
|
\else
|
|
|
|
\echo 'should not print #9-2'
|
|
|
|
\endif
|
|
|
|
\if :{?no_such_variable}
|
|
|
|
\echo 'should not print #10-1'
|
|
|
|
\else
|
|
|
|
\echo '#10-2 ok, variable no_such_variable is not defined'
|
|
|
|
#10-2 ok, variable no_such_variable is not defined
|
|
|
|
\endif
|
|
|
|
SELECT :{?i} AS i_is_defined;
|
|
|
|
i_is_defined
|
|
|
|
--------------
|
|
|
|
t
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
SELECT NOT :{?no_such_var} AS no_such_var_is_not_defined;
|
|
|
|
no_such_var_is_not_defined
|
|
|
|
----------------------------
|
|
|
|
t
|
|
|
|
(1 row)
|
|
|
|
|
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
|
2017-04-02 22:50:25 +02:00
|
|
|
-- test printing and clearing the query buffer
|
|
|
|
SELECT 1;
|
|
|
|
?column?
|
|
|
|
----------
|
|
|
|
1
|
|
|
|
(1 row)
|
|
|
|
|
|
|
|
\p
|
|
|
|
SELECT 1;
|
|
|
|
SELECT 2 \r
|
|
|
|
\p
|
|
|
|
SELECT 1;
|
|
|
|
SELECT 3 \p
|
|
|
|
SELECT 3
|
|
|
|
UNION SELECT 4 \p
|
|
|
|
SELECT 3
|
|
|
|
UNION SELECT 4
|
|
|
|
UNION SELECT 5
|
|
|
|
ORDER BY 1;
|
|
|
|
?column?
|
|
|
|
----------
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
(3 rows)
|
|
|
|
|
|
|
|
\r
|
|
|
|
\p
|
|
|
|
SELECT 3
|
|
|
|
UNION SELECT 4
|
|
|
|
UNION SELECT 5
|
|
|
|
ORDER BY 1;
|
2017-09-13 01:27:48 +02:00
|
|
|
-- tests for special result variables
|
|
|
|
-- working query, 2 rows selected
|
|
|
|
SELECT 1 AS stuff UNION SELECT 2;
|
|
|
|
stuff
|
|
|
|
-------
|
|
|
|
1
|
|
|
|
2
|
|
|
|
(2 rows)
|
|
|
|
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: false
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 00000
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 2
|
|
|
|
-- syntax error
|
|
|
|
SELECT 1 UNION;
|
|
|
|
ERROR: syntax error at or near ";"
|
|
|
|
LINE 1: SELECT 1 UNION;
|
|
|
|
^
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 42601
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 0
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: syntax error at or near ";"
|
|
|
|
\echo 'last error code:' :LAST_ERROR_SQLSTATE
|
|
|
|
last error code: 42601
|
|
|
|
-- empty query
|
|
|
|
;
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: false
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 00000
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 0
|
|
|
|
-- must have kept previous values
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: syntax error at or near ";"
|
|
|
|
\echo 'last error code:' :LAST_ERROR_SQLSTATE
|
|
|
|
last error code: 42601
|
|
|
|
-- other query error
|
|
|
|
DROP TABLE this_table_does_not_exist;
|
|
|
|
ERROR: table "this_table_does_not_exist" does not exist
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 42P01
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 0
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: table "this_table_does_not_exist" does not exist
|
|
|
|
\echo 'last error code:' :LAST_ERROR_SQLSTATE
|
|
|
|
last error code: 42P01
|
2019-04-04 23:22:02 +02:00
|
|
|
-- nondefault verbosity error settings (except verbose, which is too unstable)
|
|
|
|
\set VERBOSITY terse
|
|
|
|
SELECT 1 UNION;
|
|
|
|
ERROR: syntax error at or near ";" at character 15
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 42601
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: syntax error at or near ";"
|
|
|
|
\set VERBOSITY sqlstate
|
|
|
|
SELECT 1/0;
|
|
|
|
ERROR: 22012
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 22012
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: division by zero
|
|
|
|
\set VERBOSITY default
|
2017-09-13 01:27:48 +02:00
|
|
|
-- working \gdesc
|
|
|
|
SELECT 3 AS three, 4 AS four \gdesc
|
|
|
|
Column | Type
|
|
|
|
--------+---------
|
|
|
|
three | integer
|
|
|
|
four | integer
|
|
|
|
(2 rows)
|
|
|
|
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: false
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 00000
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 2
|
|
|
|
-- \gdesc with an error
|
|
|
|
SELECT 4 AS \gdesc
|
|
|
|
ERROR: syntax error at end of input
|
|
|
|
LINE 1: SELECT 4 AS
|
|
|
|
^
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 42601
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 0
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: syntax error at end of input
|
|
|
|
\echo 'last error code:' :LAST_ERROR_SQLSTATE
|
|
|
|
last error code: 42601
|
|
|
|
-- check row count for a cursor-fetched query
|
|
|
|
\set FETCH_COUNT 10
|
2017-09-13 18:27:01 +02:00
|
|
|
select unique2 from tenk1 order by unique2 limit 19;
|
2017-09-13 01:27:48 +02:00
|
|
|
unique2
|
|
|
|
---------
|
|
|
|
0
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
(19 rows)
|
|
|
|
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: false
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 00000
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 19
|
2017-09-13 18:27:01 +02:00
|
|
|
-- cursor-fetched query with an error after the first group
|
|
|
|
select 1/(15-unique2) from tenk1 order by unique2 limit 19;
|
|
|
|
?column?
|
|
|
|
----------
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
2017-09-13 01:27:48 +02:00
|
|
|
ERROR: division by zero
|
|
|
|
\echo 'error:' :ERROR
|
|
|
|
error: true
|
|
|
|
\echo 'error code:' :SQLSTATE
|
|
|
|
error code: 22012
|
|
|
|
\echo 'number of rows:' :ROW_COUNT
|
|
|
|
number of rows: 0
|
|
|
|
\echo 'last error message:' :LAST_ERROR_MESSAGE
|
|
|
|
last error message: division by zero
|
|
|
|
\echo 'last error code:' :LAST_ERROR_SQLSTATE
|
|
|
|
last error code: 22012
|
|
|
|
\unset FETCH_COUNT
|