Browse Source

Remove trailing whitespace from *.sgml files.

Historically we've been lax about this, but seeing that we're not
lax in C files, there doesn't seem to be a good reason to be so
in the documentation.  Remove the existing occurrences (mostly
though not entirely in copied-n-pasted psql output), and modify
.gitattributes so that "git diff --check" will warn about future
cases.

While at it, add *.pm to the set of extensions .gitattributes
knows about, and remove some obsolete entries for files that
we don't have in the tree anymore.

Per followup discussion of commit 5a892c9b1.

Discussion: https://postgr.es/m/E1nfcV1-000kOR-E5@gemulon.postgresql.org
REL_15_STABLE
Tom Lane 3 months ago
parent
commit
836af9756b
  1. 7
      .gitattributes
  2. 8
      doc/src/sgml/advanced.sgml
  3. 2
      doc/src/sgml/backup.sgml
  4. 8
      doc/src/sgml/bloom.sgml
  5. 12
      doc/src/sgml/charset.sgml
  6. 32
      doc/src/sgml/datatype.sgml
  7. 6
      doc/src/sgml/dblink.sgml
  8. 4
      doc/src/sgml/ddl.sgml
  9. 2
      doc/src/sgml/fdwhandler.sgml
  10. 92
      doc/src/sgml/func.sgml
  11. 2
      doc/src/sgml/high-availability.sgml
  12. 8
      doc/src/sgml/hstore.sgml
  13. 6
      doc/src/sgml/json.sgml
  14. 58
      doc/src/sgml/logical-replication.sgml
  15. 26
      doc/src/sgml/logicaldecoding.sgml
  16. 2
      doc/src/sgml/monitoring.sgml
  17. 26
      doc/src/sgml/pageinspect.sgml
  18. 2
      doc/src/sgml/parallel.sgml
  19. 4
      doc/src/sgml/perform.sgml
  20. 4
      doc/src/sgml/pgfreespacemap.sgml
  21. 4
      doc/src/sgml/pgstatstatements.sgml
  22. 10
      doc/src/sgml/pgsurgery.sgml
  23. 6
      doc/src/sgml/pgwalinspect.sgml
  24. 14
      doc/src/sgml/planstats.sgml
  25. 2
      doc/src/sgml/plperl.sgml
  26. 4
      doc/src/sgml/plpgsql.sgml
  27. 6
      doc/src/sgml/postgres-fdw.sgml
  28. 4
      doc/src/sgml/ref/create_index.sgml
  29. 4
      doc/src/sgml/ref/explain.sgml
  30. 3
      doc/src/sgml/ref/pgarchivecleanup.sgml
  31. 2
      doc/src/sgml/ref/pgtestfsync.sgml
  32. 14
      doc/src/sgml/ref/psql-ref.sgml
  33. 4
      doc/src/sgml/ref/reindex.sgml
  34. 4
      doc/src/sgml/ref/rollback_to.sgml
  35. 2
      doc/src/sgml/ref/select.sgml
  36. 4
      doc/src/sgml/ref/set_role.sgml
  37. 4
      doc/src/sgml/ref/set_session_auth.sgml
  38. 2
      doc/src/sgml/ref/show.sgml
  39. 4
      doc/src/sgml/release-15.sgml
  40. 8
      doc/src/sgml/rules.sgml
  41. 14
      doc/src/sgml/syntax.sgml
  42. 2
      doc/src/sgml/test-decoding.sgml
  43. 102
      doc/src/sgml/textsearch.sgml
  44. 4
      doc/src/sgml/xaggr.sgml
  45. 16
      doc/src/sgml/xfunc.sgml

7
.gitattributes vendored

@ -1,8 +1,9 @@
* whitespace=space-before-tab,trailing-space
*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
*.pm whitespace=space-before-tab,trailing-space,tabwidth=4
*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent
*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent
# Avoid confusing ASCII underlines with leftover merge conflict markers
@ -17,9 +18,6 @@ src/backend/utils/Gen_dummy_probes.pl.prolog whitespace=-blank-at-eof
# Test output files that contain extra whitespace
*.out -whitespace
contrib/*/output/*.source -whitespace
src/pl/plpgsql/src/output/*.source -whitespace
src/test/regress/output/*.source -whitespace
src/interfaces/ecpg/test/expected/* -whitespace
src/interfaces/libpq/test/expected.out whitespace=-blank-at-eof
@ -27,7 +25,6 @@ src/interfaces/libpq/test/expected.out whitespace=-blank-at-eof
configure -whitespace
ppport.h -whitespace
src/backend/regex/COPYRIGHT -whitespace
src/backend/regex/re_syntax.n -whitespace
src/backend/snowball/libstemmer/*.c -whitespace
src/backend/utils/mb/Unicode/*-std.txt -whitespace
src/include/snowball/libstemmer/* -whitespace

8
doc/src/sgml/advanced.sgml

@ -344,7 +344,7 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps
</programlisting>
<screen>
depname | empno | salary | avg
depname | empno | salary | avg
-----------+-------+--------+-----------------------
develop | 11 | 5200 | 5020.0000000000000000
develop | 7 | 4200 | 5020.0000000000000000
@ -394,7 +394,7 @@ FROM empsalary;
</programlisting>
<screen>
depname | empno | salary | rank
depname | empno | salary | rank
-----------+-------+--------+------
develop | 8 | 6000 | 1
develop | 10 | 5200 | 2
@ -458,7 +458,7 @@ SELECT salary, sum(salary) OVER () FROM empsalary;
</programlisting>
<screen>
salary | sum
salary | sum
--------+-------
5200 | 47100
5000 | 47100
@ -487,7 +487,7 @@ SELECT salary, sum(salary) OVER (ORDER BY salary) FROM empsalary;
</programlisting>
<screen>
salary | sum
salary | sum
--------+-------
3500 | 3500
3900 | 7400

2
doc/src/sgml/backup.sgml

@ -929,7 +929,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
<filename>backup_label</filename> in the root directory of the backup. The
third field should be written to a file named
<filename>tablespace_map</filename> unless the field is empty. These files are
vital to the backup working and must be written byte for byte without
vital to the backup working and must be written byte for byte without
modification, which may require opening the file in binary mode.
</para>
</listitem>

8
doc/src/sgml/bloom.sgml

@ -116,7 +116,7 @@ SELECT 10000000
A sequential scan over this large table takes a long time:
<programlisting>
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;-----------------------------------
Seq Scan on tbloom (cost=0.00..2137.14 rows=3 width=24) (actual time=16.971..16.971 rows=0 loops=1)
Filter: ((i2 = 898732) AND (i5 = 123451))
@ -139,7 +139,7 @@ CREATE INDEX
3976 kB
(1 row)
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;-----------------------------------
Seq Scan on tbloom (cost=0.00..2137.00 rows=2 width=24) (actual time=12.805..12.805 rows=0 loops=1)
Filter: ((i2 = 898732) AND (i5 = 123451))
@ -162,7 +162,7 @@ CREATE INDEX
1584 kB
(1 row)
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;--------------------------------------------------
Bitmap Heap Scan on tbloom (cost=1792.00..1799.69 rows=2 width=24) (actual time=0.388..0.388 rows=0 loops=1)
Recheck Cond: ((i2 = 898732) AND (i5 = 123451))
@ -195,7 +195,7 @@ CREATE INDEX
=# CREATE INDEX btreeidx6 ON tbloom (i6);
CREATE INDEX
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;--------------------------------------------------------
Bitmap Heap Scan on tbloom (cost=24.34..32.03 rows=2 width=24) (actual time=0.028..0.029 rows=0 loops=1)
Recheck Cond: ((i5 = 123451) AND (i2 = 898732))

12
doc/src/sgml/charset.sgml

@ -1574,13 +1574,13 @@ CREATE DATABASE korean WITH ENCODING 'EUC_KR' LC_COLLATE='ko_KR.euckr' LC_CTYPE=
<screen>
$ <userinput>psql -l</userinput>
List of databases
Name | Owner | Encoding | Collation | Ctype | Access Privileges
Name | Owner | Encoding | Collation | Ctype | Access Privileges
-----------+----------+-----------+-------------+-------------+-------------------------------------
clocaledb | hlinnaka | SQL_ASCII | C | C |
englishdb | hlinnaka | UTF8 | en_GB.UTF8 | en_GB.UTF8 |
japanese | hlinnaka | UTF8 | ja_JP.UTF8 | ja_JP.UTF8 |
korean | hlinnaka | EUC_KR | ko_KR.euckr | ko_KR.euckr |
postgres | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 |
clocaledb | hlinnaka | SQL_ASCII | C | C |
englishdb | hlinnaka | UTF8 | en_GB.UTF8 | en_GB.UTF8 |
japanese | hlinnaka | UTF8 | ja_JP.UTF8 | ja_JP.UTF8 |
korean | hlinnaka | EUC_KR | ko_KR.euckr | ko_KR.euckr |
postgres | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 |
template0 | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 | {=c/hlinnaka,hlinnaka=CTc/hlinnaka}
template1 | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 | {=c/hlinnaka,hlinnaka=CTc/hlinnaka}
(7 rows)

32
doc/src/sgml/datatype.sgml

@ -3177,7 +3177,7 @@ CREATE TABLE person (
);
INSERT INTO person VALUES ('Moe', 'happy');
SELECT * FROM person WHERE current_mood = 'happy';
name | current_mood
name | current_mood
------+--------------
Moe | happy
(1 row)
@ -3198,14 +3198,14 @@ SELECT * FROM person WHERE current_mood = 'happy';
INSERT INTO person VALUES ('Larry', 'sad');
INSERT INTO person VALUES ('Curly', 'ok');
SELECT * FROM person WHERE current_mood > 'sad';
name | current_mood
name | current_mood
-------+--------------
Moe | happy
Curly | ok
(2 rows)
SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood;
name | current_mood
name | current_mood
-------+--------------
Curly | ok
Moe | happy
@ -3214,7 +3214,7 @@ SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood;
SELECT name
FROM person
WHERE current_mood = (SELECT MIN(current_mood) FROM person);
name
name
-------
Larry
(1 row)
@ -3253,7 +3253,7 @@ ERROR: operator does not exist: mood = happiness
<programlisting>
SELECT person.name, holidays.num_weeks FROM person, holidays
WHERE person.current_mood::text = holidays.happiness::text;
name | num_weeks
name | num_weeks
------+-----------
Moe | 4
(1 row)
@ -3982,7 +3982,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
<programlisting>
SELECT macaddr8_set7bit('08:00:2b:01:02:03');
<computeroutput>
macaddr8_set7bit
macaddr8_set7bit
-------------------------
0a:00:2b:ff:fe:01:02:03
(1 row)
@ -4124,7 +4124,7 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector;
<programlisting>
SELECT $$the lexeme ' ' contains spaces$$::tsvector;
tsvector
tsvector
-------------------------------------------
' ' 'contains' 'lexeme' 'spaces' 'the'
</programlisting>
@ -4135,7 +4135,7 @@ SELECT $$the lexeme ' ' contains spaces$$::tsvector;
<programlisting>
SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector;
tsvector
tsvector
------------------------------------------------
'Joe''s' 'a' 'contains' 'lexeme' 'quote' 'the'
</programlisting>
@ -4165,7 +4165,7 @@ SELECT 'a:1 fat:2 cat:3 sat:4 on:5 a:6 mat:7 and:8 ate:9 a:10 fat:11 rat:12'::ts
<programlisting>
SELECT 'a:1A fat:2B,4C cat:5D'::tsvector;
tsvector
tsvector
----------------------------
'a':1A 'cat':5 'fat':2B,4C
</programlisting>
@ -4184,7 +4184,7 @@ SELECT 'a:1A fat:2B,4C cat:5D'::tsvector;
<programlisting>
SELECT 'The Fat Rats'::tsvector;
tsvector
tsvector
--------------------
'Fat' 'Rats' 'The'
</programlisting>
@ -4197,7 +4197,7 @@ SELECT 'The Fat Rats'::tsvector;
<programlisting>
SELECT to_tsvector('english', 'The Fat Rats');
to_tsvector
to_tsvector
-----------------
'fat':2 'rat':3
</programlisting>
@ -4239,17 +4239,17 @@ SELECT to_tsvector('english', 'The Fat Rats');
<programlisting>
SELECT 'fat &amp; rat'::tsquery;
tsquery
tsquery
---------------
'fat' &amp; 'rat'
SELECT 'fat &amp; (rat | cat)'::tsquery;
tsquery
tsquery
---------------------------
'fat' &amp; ( 'rat' | 'cat' )
SELECT 'fat &amp; rat &amp; ! cat'::tsquery;
tsquery
tsquery
------------------------
'fat' &amp; 'rat' &amp; !'cat'
</programlisting>
@ -4273,7 +4273,7 @@ SELECT 'fat:ab &amp; cat'::tsquery;
to specify prefix matching:
<programlisting>
SELECT 'super:*'::tsquery;
tsquery
tsquery
-----------
'super':*
</programlisting>
@ -4290,7 +4290,7 @@ SELECT 'super:*'::tsquery;
<programlisting>
SELECT to_tsquery('Fat:ab &amp; Cats');
to_tsquery
to_tsquery
------------------
'fat':AB &amp; 'cat'
</programlisting>

6
doc/src/sgml/dblink.sgml

@ -161,13 +161,13 @@ GRANT SELECT ON TABLE foo TO regress_dblink_user;
\set ORIGINAL_USER :USER
\c - regress_dblink_user
SELECT dblink_connect('myconn', 'fdtest');
dblink_connect
dblink_connect
----------------
OK
(1 row)
SELECT * FROM dblink('myconn', 'SELECT * FROM foo') AS t(a int, b text, c text[]);
a | b | c
a | b | c
----+---+---------------
0 | a | {a0,b0,c0}
1 | b | {a1,b1,c1}
@ -1397,7 +1397,7 @@ dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, ex
<screen>
SELECT dblink_exec('LISTEN virtual');
dblink_exec
dblink_exec
-------------
LISTEN
(1 row)

4
doc/src/sgml/ddl.sgml

@ -2619,13 +2619,13 @@ CREATE POLICY admin_local_only ON passwd AS RESTRICTIVE TO admin
<programlisting>
=&gt; SELECT current_user;
current_user
current_user
--------------
admin
(1 row)
=&gt; select inet_client_addr();
inet_client_addr
inet_client_addr
------------------
127.0.0.1
(1 row)

2
doc/src/sgml/fdwhandler.sgml

@ -1089,7 +1089,7 @@ ExecForeignTruncate(List *rels,
requested in the original <command>TRUNCATE</command> command,
respectively.
</para>
<para>
If <literal>restart_seqs</literal> is <literal>true</literal>,
the original <command>TRUNCATE</command> command requested the

92
doc/src/sgml/func.sgml

@ -6011,44 +6011,44 @@ regexp_replace('A PostgreSQL function', 'a|e|i|o|u', 'X', 1, 3, 'i')
Some examples:
<programlisting>
SELECT foo FROM regexp_split_to_table('the quick brown fox jumps over the lazy dog', '\s+') AS foo;
foo
foo
-------
the
quick
brown
fox
jumps
over
the
lazy
dog
the
quick
brown
fox
jumps
over
the
lazy
dog
(9 rows)
SELECT regexp_split_to_array('the quick brown fox jumps over the lazy dog', '\s+');
regexp_split_to_array
regexp_split_to_array
-----------------------------------------------
{the,quick,brown,fox,jumps,over,the,lazy,dog}
(1 row)
SELECT foo FROM regexp_split_to_table('the quick brown fox', '\s*') AS foo;
foo
foo
-----
t
h
e
q
u
i
c
k
b
r
o
w
n
f
o
x
t
h
e
q
u
i
c
k
b
r
o
w
n
f
o
x
(16 rows)
</programlisting>
</para>
@ -14400,32 +14400,32 @@ SELECT xmlexists('//town[text() = ''Toronto'']' PASSING BY VALUE '<towns><town>T
<screen><![CDATA[
SET xmloption TO DOCUMENT;
SELECT xml_is_well_formed('<>');
xml_is_well_formed
xml_is_well_formed
--------------------
f
(1 row)
SELECT xml_is_well_formed('<abc/>');
xml_is_well_formed
xml_is_well_formed
--------------------
t
(1 row)
SET xmloption TO CONTENT;
SELECT xml_is_well_formed('abc');
xml_is_well_formed
xml_is_well_formed
--------------------
t
(1 row)
SELECT xml_is_well_formed_document('<pg:foo xmlns:pg="http://postgresql.org/stuff">bar</pg:foo>');
xml_is_well_formed_document
xml_is_well_formed_document
-----------------------------
t
(1 row)
SELECT xml_is_well_formed_document('<pg:foo xmlns:pg="http://postgresql.org/stuff">bar</my:foo>');
xml_is_well_formed_document
xml_is_well_formed_document
-----------------------------
f
(1 row)
@ -14492,7 +14492,7 @@ SELECT xml_is_well_formed_document('<pg:foo xmlns:pg="http://postgresql.org/stuf
SELECT xpath('/my:a/text()', '<my:a xmlns:my="http://example.com">test</my:a>',
ARRAY[ARRAY['my', 'http://example.com']]);
xpath
xpath
--------
{test}
(1 row)
@ -14540,7 +14540,7 @@ SELECT xpath('//mydefns:b/text()', '<a xmlns="http://example.com"><b>test</b></a
SELECT xpath_exists('/my:a/text()', '<my:a xmlns:my="http://example.com">test</my:a>',
ARRAY[ARRAY['my', 'http://example.com']]);
xpath_exists
xpath_exists
--------------
t
(1 row)
@ -14773,7 +14773,7 @@ SELECT xmltable.*
'concat(SIZE[@unit!="sq_km"], " ", SIZE[@unit!="sq_km"]/@unit)',
premier_name text PATH 'PREMIER_NAME' DEFAULT 'not specified');
id | ordinality | COUNTRY_NAME | country_id | size_sq_km | size_other | premier_name
id | ordinality | COUNTRY_NAME | country_id | size_sq_km | size_other | premier_name
----+------------+--------------+------------+------------+--------------+---------------
1 | 1 | Australia | AU | | | not specified
5 | 2 | Japan | JP | | 145935 sq_mi | Shinzo Abe
@ -14794,9 +14794,9 @@ $$ AS data;
SELECT xmltable.*
FROM xmlelements, XMLTABLE('/root' PASSING data COLUMNS element text);
element
element
-------------------------
Hello2a2 bbbxxxCC
Hello2a2 bbbxxxCC
]]></screen>
</para>
@ -17769,14 +17769,14 @@ $.* ? (@ like_regex "^\\d+$")
</para>
<screen>
SELECT JSON('{ "a" : 123, "b": [ true, "foo" ], "a" : "bar" }');
json
json
--------------------------------------------------
{ "a" : 123, "b": [ true, "foo" ], "a" : "bar" }
(1 row)
SELECT JSON('{"a": 123, "b": [true, "foo"], "a": "bar"}' RETURNING jsonb);
json
json
----------------------------------
{"a": "bar", "b": [true, "foo"]}
(1 row)
@ -18097,7 +18097,7 @@ WHERE f.did = 103;
<sect4 id="functions-jsonobjectagg">
<title><literal>JSON_OBJECTAGG</literal></title>
<indexterm><primary>json_objectagg</primary></indexterm>
<synopsis>
<function>JSON_OBJECTAGG</function> (
<optional> { <parameter>key_expression</parameter> { VALUE | ':' } <parameter>value_expression</parameter> } </optional>
@ -18906,7 +18906,7 @@ SELECT JSON_VALUE('123.45', '$' RETURNING int ERROR ON ERROR);
(1 row)
SELECT JSON_VALUE('"03:04 2015-02-01"', '$.datetime("HH24:MI YYYY-MM-DD")' RETURNING date);
json_value
json_value
------------
2015-02-01
(1 row)
@ -19222,7 +19222,7 @@ SELECT JSON_QUERY(jsonb '"aaa"', '$' RETURNING text OMIT QUOTES);
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>VALUE | SCALAR | ARRAY | OBJECT</literal>
@ -19875,7 +19875,7 @@ JSON_SERIALIZE (
</para>
<screen>
SELECT JSON_SERIALIZE(JSON_SCALAR('foo'));
json_serialize
json_serialize
----------------
"foo"
(1 row)
@ -19890,7 +19890,7 @@ SELECT JSON_SERIALIZE('{"foo": "bar", "baz": [1, 2]}' RETURNING bytea);
</sect4>
</sect3>
<sect3 id="sqljson-common-clauses">
<title>SQL/JSON Common Clauses</title>
@ -28114,7 +28114,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
to log the memory contexts of a backend process. For example:
<programlisting>
postgres=# SELECT pg_log_backend_memory_contexts(pg_backend_pid());
pg_log_backend_memory_contexts
pg_log_backend_memory_contexts
--------------------------------
t
(1 row)

2
doc/src/sgml/high-availability.sgml

@ -980,7 +980,7 @@ postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
node_a_slot |
postgres=# SELECT slot_name, slot_type, active FROM pg_replication_slots;
slot_name | slot_type | active
slot_name | slot_type | active
-------------+-----------+--------
node_a_slot | physical | f
(1 row)

8
doc/src/sgml/hstore.sgml

@ -817,7 +817,7 @@ CREATE TABLE test (col1 integer, col2 text, col3 text);
INSERT INTO test VALUES (123, 'foo', 'bar');
SELECT hstore(t) FROM test AS t;
hstore
hstore
---------------------------------------------
"col1"=&gt;"123", "col2"=&gt;"foo", "col3"=&gt;"bar"
(1 row)
@ -831,9 +831,9 @@ CREATE TABLE test (col1 integer, col2 text, col3 text);
SELECT * FROM populate_record(null::test,
'"col1"=&gt;"456", "col2"=&gt;"zzz"');
col1 | col2 | col3
col1 | col2 | col3
------+------+------
456 | zzz |
456 | zzz |
(1 row)
</programlisting>
</para>
@ -845,7 +845,7 @@ CREATE TABLE test (col1 integer, col2 text, col3 text);
INSERT INTO test VALUES (123, 'foo', 'bar');
SELECT (r).* FROM (SELECT t #= '"col3"=&gt;"baz"' AS r FROM test t) s;
col1 | col2 | col3
col1 | col2 | col3
------+------+------
123 | foo | baz
(1 row)

6
doc/src/sgml/json.sgml

@ -200,13 +200,13 @@ SELECT '{"foo": [true, "bar"], "tags": {"a": 1, "b": null}}'::json;
details such as whitespace. For example, note the differences here:
<programlisting>
SELECT '{"bar": "baz", "balance": 7.77, "active":false}'::json;
json
json
-------------------------------------------------
{"bar": "baz", "balance": 7.77, "active":false}
(1 row)
SELECT '{"bar": "baz", "balance": 7.77, "active":false}'::jsonb;
jsonb
jsonb
--------------------------------------------------
{"bar": "baz", "active": false, "balance": 7.77}
(1 row)
@ -218,7 +218,7 @@ SELECT '{"bar": "baz", "balance": 7.77, "active":false}'::jsonb;
example:
<programlisting>
SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
json | jsonb
json | jsonb
-----------------------+-------------------------
{"reading": 1.230e-5} | {"reading": 0.00001230}
(1 row)

58
doc/src/sgml/logical-replication.sgml

@ -118,7 +118,7 @@
any combination of <command>INSERT</command>, <command>UPDATE</command>,
<command>DELETE</command>, and <command>TRUNCATE</command>, similar to how triggers are fired by
particular event types. By default, all operation types are replicated.
(Row filters have no effect for <command>TRUNCATE</command>. See
(Row filters have no effect for <command>TRUNCATE</command>. See
<xref linkend="logical-replication-row-filter"/>).
</para>
@ -324,7 +324,7 @@
<para>
By default, all data from all published tables will be replicated to the
appropriate subscribers. The replicated data can be reduced by using a
appropriate subscribers. The replicated data can be reduced by using a
<firstterm>row filter</firstterm>. A user might choose to use row filters
for behavioral, security or performance reasons. If a published table sets a
row filter, a row is replicated only if its data satisfies the row filter
@ -533,14 +533,14 @@ CREATE PUBLICATION
<programlisting>
test_pub=# \dRp+
Publication p1
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
----------+------------+---------+---------+---------+-----------+----------
postgres | f | t | t | t | t | f
Tables:
"public.t1" WHERE ((a > 5) AND (c = 'NSW'::text))
Publication p2
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
----------+------------+---------+---------+---------+-----------+----------
postgres | f | t | t | t | t | f
Tables:
@ -548,7 +548,7 @@ Tables:
"public.t2" WHERE (e = 99)
Publication p3
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
Owner | All tables | Inserts | Updates | Deletes | Truncates | Via root
----------+------------+---------+---------+---------+-----------+----------
postgres | f | t | t | t | t | f
Tables:
@ -565,11 +565,11 @@ Tables:
<programlisting>
test_pub=# \d t1
Table "public.t1"
Column | Type | Collation | Nullable | Default
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | not null |
b | integer | | |
c | text | | not null |
a | integer | | not null |
b | integer | | |
c | text | | not null |
Indexes:
"t1_pkey" PRIMARY KEY, btree (a, c)
Publications:
@ -578,11 +578,11 @@ Publications:
test_pub=# \d t2
Table "public.t2"
Column | Type | Collation | Nullable | Default
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
d | integer | | not null |
e | integer | | |
f | integer | | |
d | integer | | not null |
e | integer | | |
f | integer | | |
Indexes:
"t2_pkey" PRIMARY KEY, btree (d)
Publications:
@ -591,11 +591,11 @@ Publications:
test_pub=# \d t3
Table "public.t3"
Column | Type | Collation | Nullable | Default
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
g | integer | | not null |
h | integer | | |
i | integer | | |
g | integer | | not null |
h | integer | | |
i | integer | | |
Indexes:
"t3_pkey" PRIMARY KEY, btree (g)
Publications:
@ -636,7 +636,7 @@ INSERT 0 1
test_pub=# INSERT INTO t1 VALUES (9, 109, 'NSW');
INSERT 0 1
test_pub=# SELECT * FROM t1;
test_pub=# SELECT * FROM t1;
a | b | c
---+-----+-----
2 | 102 | NSW
@ -651,7 +651,7 @@ test_pub=# SELECT * FROM t1;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM t1;
a | b | c
a | b | c
---+-----+-----
6 | 106 | NSW
9 | 109 | NSW
@ -668,7 +668,7 @@ test_pub=# UPDATE t1 SET b = 999 WHERE a = 6;
UPDATE 1
test_pub=# SELECT * FROM t1;
a | b | c
a | b | c
---+-----+-----
2 | 102 | NSW
3 | 103 | QLD
@ -682,7 +682,7 @@ test_pub=# SELECT * FROM t1;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM t1;
a | b | c
a | b | c
---+-----+-----
9 | 109 | NSW
6 | 999 | NSW
@ -700,7 +700,7 @@ test_pub=# UPDATE t1 SET a = 555 WHERE a = 2;
UPDATE 1
test_pub=# SELECT * FROM t1;
a | b | c
a | b | c
-----+-----+-----
3 | 103 | QLD
4 | 104 | VIC
@ -714,7 +714,7 @@ test_pub=# SELECT * FROM t1;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM t1;
a | b | c
a | b | c
-----+-----+-----
9 | 109 | NSW
6 | 999 | NSW
@ -733,7 +733,7 @@ test_pub=# UPDATE t1 SET c = 'VIC' WHERE a = 9;
UPDATE 1
test_pub=# SELECT * FROM t1;
a | b | c
a | b | c
-----+-----+-----
3 | 103 | QLD
4 | 104 | VIC
@ -747,7 +747,7 @@ test_pub=# SELECT * FROM t1;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM t1;
a | b | c
a | b | c
-----+-----+-----
6 | 999 | NSW
555 | 102 | NSW
@ -806,7 +806,7 @@ test_pub=# INSERT INTO child VALUES (3), (5), (7);
INSERT 0 3
test_pub=# SELECT * FROM parent ORDER BY a;
a
a
---
2
3
@ -818,7 +818,7 @@ test_pub=# SELECT * FROM parent ORDER BY a;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM parent ORDER BY a;
a
a
---
2
3
@ -855,7 +855,7 @@ test_pub=# INSERT INTO child VALUES (3), (5), (7);
INSERT 0 3
test_pub=# SELECT * FROM parent ORDER BY a;
a
a
---
2
3
@ -867,7 +867,7 @@ test_pub=# SELECT * FROM parent ORDER BY a;
</programlisting>
<programlisting>
test_sub=# SELECT * FROM child ORDER BY a;
a
a
---
5
6

26
doc/src/sgml/logicaldecoding.sgml

@ -69,7 +69,7 @@ postgres=# SELECT slot_name, plugin, slot_type, database, active, restart_lsn, c
postgres=# -- There are no changes to see yet
postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----+-----+------
(0 rows)
@ -78,7 +78,7 @@ CREATE TABLE
postgres=# -- DDL isn't replicated, so all you'll see is the transaction
postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-------+--------------
0/BA2DA58 | 10297 | BEGIN 10297
0/BA5A5A0 | 10297 | COMMIT 10297
@ -87,7 +87,7 @@ postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NU
postgres=# -- Once changes are read, they're consumed and not emitted
postgres=# -- in a subsequent call:
postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----+-----+------
(0 rows)
@ -97,7 +97,7 @@ postgres=*# INSERT INTO data(data) VALUES('2');
postgres=*# COMMIT;
postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-------+---------------------------------------------------------
0/BA5A688 | 10298 | BEGIN 10298
0/BA5A6F0 | 10298 | table public.data: INSERT: id[integer]:1 data[text]:'1'
@ -109,7 +109,7 @@ postgres=# INSERT INTO data(data) VALUES('3');
postgres=# -- You can also peek ahead in the change stream without consuming changes
postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-------+---------------------------------------------------------
0/BA5A8E0 | 10299 | BEGIN 10299
0/BA5A8E0 | 10299 | table public.data: INSERT: id[integer]:3 data[text]:'3'
@ -118,7 +118,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
postgres=# -- The next call to pg_logical_slot_peek_changes() returns the same changes again
postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-------+---------------------------------------------------------
0/BA5A8E0 | 10299 | BEGIN 10299
0/BA5A8E0 | 10299 | table public.data: INSERT: id[integer]:3 data[text]:'3'
@ -127,7 +127,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
postgres=# -- options can be passed to output plugin, to influence the formatting
postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'include-timestamp', 'on');
lsn | xid | data
lsn | xid | data
-----------+-------+---------------------------------------------------------
0/BA5A8E0 | 10299 | BEGIN 10299
0/BA5A8E0 | 10299 | table public.data: INSERT: id[integer]:3 data[text]:'3'
@ -200,7 +200,7 @@ postgres=*# INSERT INTO data(data) VALUES('5');
postgres=*# PREPARE TRANSACTION 'test_prepared1';
postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-----+---------------------------------------------------------
0/1689DC0 | 529 | BEGIN 529
0/1689DC0 | 529 | table public.data: INSERT: id[integer]:3 data[text]:'5'
@ -209,7 +209,7 @@ postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NU
postgres=# COMMIT PREPARED 'test_prepared1';
postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-----+--------------------------------------------
0/168A060 | 529 | COMMIT PREPARED 'test_prepared1', txid 529
(4 row)
@ -219,7 +219,7 @@ postgres=# BEGIN;
postgres=*# INSERT INTO data(data) VALUES('6');
postgres=*# PREPARE TRANSACTION 'test_prepared2';
postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-----+---------------------------------------------------------
0/168A180 | 530 | BEGIN 530
0/168A1E8 | 530 | table public.data: INSERT: id[integer]:4 data[text]:'6'
@ -228,7 +228,7 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
postgres=# ROLLBACK PREPARED 'test_prepared2';
postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NULL);
lsn | xid | data
lsn | xid | data
-----------+-----+----------------------------------------------
0/168A4B8 | 530 | ROLLBACK PREPARED 'test_prepared2', txid 530
(1 row)
@ -850,7 +850,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<parameter>gid</parameter> field, which is part of the
<parameter>txn</parameter> parameter, can be used in this callback to
check if the plugin has already received this <command>PREPARE</command>
in which case it can either error out or skip the remaining changes of
in which case it can either error out or skip the remaining changes of
the transaction.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@ -978,7 +978,7 @@ typedef void (*LogicalDecodeStreamCommitCB) (struct LogicalDecodingContext *ctx,
</programlisting>
</para>
</sect3>
<sect3 id="logicaldecoding-output-plugin-stream-change">
<title>Stream Change Callback</title>
<para>

2
doc/src/sgml/monitoring.sgml

@ -2302,7 +2302,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<programlisting>
SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event is NOT NULL;
pid | wait_event_type | wait_event
pid | wait_event_type | wait_event
------+-----------------+------------
2540 | Lock | relation
6644 | LWLock | ProcArray

26
doc/src/sgml/pageinspect.sgml

@ -492,7 +492,7 @@ test=# SELECT itemoffset, ctid, itemlen, nulls, vars, data, dead, htid, tids[0:2
not a valid <acronym>BRIN</acronym> page. For example:
<screen>
test=# SELECT brin_page_type(get_raw_page('brinidx', 0));
brin_page_type
brin_page_type
----------------
meta
</screen>
@ -514,7 +514,7 @@ test=# SELECT brin_page_type(get_raw_page('brinidx', 0));
about a <acronym>BRIN</acronym> index metapage. For example:
<screen>
test=# SELECT * FROM brin_metapage_info(get_raw_page('brinidx', 0));
magic | version | pagesperrange | lastrevmappage
magic | version | pagesperrange | lastrevmappage
------------+---------+---------------+----------------
0xA8109CFA | 1 | 4 | 2
</screen>
@ -537,7 +537,7 @@ test=# SELECT * FROM brin_metapage_info(get_raw_page('brinidx', 0));
For example:
<screen>
test=# SELECT * FROM brin_revmap_data(get_raw_page('brinidx', 2)) LIMIT 5;
pages
pages
---------
(6,137)
(6,138)
@ -565,13 +565,13 @@ test=# SELECT * FROM brin_revmap_data(get_raw_page('brinidx', 2)) LIMIT 5;
test=# SELECT * FROM brin_page_items(get_raw_page('brinidx', 5),
'brinidx')
ORDER BY blknum, attnum LIMIT 6;
itemoffset | blknum | attnum | allnulls | hasnulls | placeholder | value
itemoffset | blknum | attnum | allnulls | hasnulls | placeholder | value
------------+--------+--------+----------+----------+-------------+--------------
137 | 0 | 1 | t | f | f |
137 | 0 | 1 | t | f | f |
137 | 0 | 2 | f | f | f | {1 .. 88}
138 | 4 | 1 | t | f | f |
138 | 4 | 1 | t | f | f |
138 | 4 | 2 | f | f | f | {89 .. 176}
139 | 8 | 1 | t | f | f |
139 | 8 | 1 | t | f | f |
139 | 8 | 2 | f | f | f | {177 .. 264}
</screen>
The returned columns correspond to the fields in the
@ -693,7 +693,7 @@ test=# SELECT first_tid, nbytes, tids[0:5] AS some_tids
For example:
<screen>
test=# SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2));
lsn | nsn | rightlink | flags
lsn | nsn | rightlink | flags
-----+-----+-----------+--------
0/1 | 0/0 | 1 | {leaf}
(1 row)
@ -716,7 +716,7 @@ test=# SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2));
the data stored in a page of a <acronym>GiST</acronym> index. For example:
<screen>
test=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
itemoffset | ctid | itemlen | dead | keys
itemoffset | ctid | itemlen | dead | keys
------------+-----------+---------+------+-------------------
1 | (1,65535) | 40 | f | (p)=((166,166))
2 | (2,65535) | 40 | f | (p)=((332,332))
@ -747,7 +747,7 @@ test=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gis
example:
<screen>
test=# SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
itemoffset | ctid | itemlen | dead | key_data
itemoffset | ctid | itemlen | dead | key_data
------------+-----------+---------+------+-----------------------------------------&zwsp;-------------------------------------------
1 | (1,65535) | 40 | f | \x00000100ffff28000000000000c0644000000000&zwsp;00c06440000000000000f03f000000000000f03f
2 | (2,65535) | 40 | f | \x00000200ffff28000000000000c0744000000000&zwsp;00c074400000000000e064400000000000e06440
@ -782,7 +782,7 @@ test=# SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
the given <acronym>HASH</acronym> index page. For example:
<screen>
test=# SELECT hash_page_type(get_raw_page('con_hash_index', 0));
hash_page_type
hash_page_type
----------------
metapage
</screen>
@ -835,7 +835,7 @@ hasho_page_id | 65408
index page. For example:
<screen>
test=# SELECT * FROM hash_page_items(get_raw_page('con_hash_index', 1)) LIMIT 5;
itemoffset | ctid | data
itemoffset | ctid | data
------------+-----------+------------
1 | (899,77) | 1053474816
2 | (897,29) | 1053474816
@ -862,7 +862,7 @@ test=# SELECT * FROM hash_page_items(get_raw_page('con_hash_index', 1)) LIMIT 5;
index. For example:
<screen>
test=# SELECT * FROM hash_bitmap_info('con_hash_index', 2052);
bitmapblkno | bitmapbit | bitstatus
bitmapblkno | bitmapbit | bitstatus
-------------+-----------+-----------
65 | 3 | t
</screen>

2
doc/src/sgml/parallel.sgml

@ -33,7 +33,7 @@
<screen>
EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;------------------
Gather (cost=1000.00..217018.43 rows=1 width=97)
Workers Planned: 2

4
doc/src/sgml/perform.sgml

@ -1221,7 +1221,7 @@ ANALYZE zipcodes;
SELECT stxname, stxkeys, stxddependencies
FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid)
WHERE stxname = 'stts';
stxname | stxkeys | stxddependencies
stxname | stxkeys | stxddependencies
---------+---------+------------------------------------------
stts | 1 5 | {"1 => 5": 1.000000, "5 => 1": 0.423130}
(1 row)
@ -1367,7 +1367,7 @@ ANALYZE zipcodes;
SELECT m.* FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid),
pg_mcv_list_items(stxdmcv) m WHERE stxname = 'stts3';
index | values | nulls | frequency | base_frequency
index | values | nulls | frequency | base_frequency
-------+------------------------+-------+-----------+----------------
0 | {Washington, DC} | {f,f} | 0.003467 | 2.7e-05
1 | {Apo, AE} | {f,f} | 0.003067 | 1.9e-05

4
doc/src/sgml/pgfreespacemap.sgml

@ -76,7 +76,7 @@
<screen>
postgres=# SELECT * FROM pg_freespace('foo');
blkno | avail
blkno | avail
-------+-------
0 | 0
1 | 0
@ -101,7 +101,7 @@ postgres=# SELECT * FROM pg_freespace('foo');
(20 rows)
postgres=# SELECT * FROM pg_freespace('foo', 7);
pg_freespace
pg_freespace
--------------
1216
(1 row)

4
doc/src/sgml/pgstatstatements.sgml

@ -948,7 +948,7 @@ query | SELECT pg_stat_statements_reset(0,0,0)
calls | 1
total_exec_time | 0.189497
rows | 1
hit_percent |
hit_percent |
-[ RECORD 2 ]---+--------------------------------------------------&zwsp;---------------------------
query | SELECT query, calls, total_exec_time, rows, $1 * shared_blks_hit / +
| nullif(shared_blks_hit + shared_blks_read, $2) AS hit_percent+
@ -956,7 +956,7 @@ query | SELECT query, calls, total_exec_time, rows, $1 * shared_blks_h
calls | 0
total_exec_time | 0
rows | 0
hit_percent |
hit_percent |
</screen>
</sect2>

10
doc/src/sgml/pgsurgery.sgml

@ -39,9 +39,9 @@ ERROR: could not access status of transaction 4007513275
DETAIL: Could not open file "pg_xact/0EED": No such file or directory.
test=# select heap_force_kill('t1'::regclass, ARRAY['(0, 1)']::tid[]);
heap_force_kill
heap_force_kill
-----------------
(1 row)
test=# select * from t1 where ctid = '(0, 1)';
@ -71,15 +71,15 @@ ERROR: found xmin 507 from before relfrozenxid 515
CONTEXT: while scanning block 0 of relation "public.t1"
test=# select ctid from t1 where xmin = 507;
ctid
ctid
-------
(0,3)
(1 row)
test=# select heap_force_freeze('t1'::regclass, ARRAY['(0, 3)']::tid[]);
heap_force_freeze
heap_force_freeze
-------------------
(1 row)
test=# select ctid from t1 where xmin = 2;

6
doc/src/sgml/pgwalinspect.sgml

@ -108,7 +108,7 @@
follows:
<screen>
postgres=# select start_lsn, end_lsn, prev_lsn, xid, resource_manager, record_type, record_length, main_data_length, fpi_length, description from pg_get_wal_records_info('0/14F9A30', '0/15011D7');
start_lsn | end_lsn | prev_lsn | xid | resource_manager | record_type | record_length | main_data_length | fpi_length | description
start_lsn | end_lsn | prev_lsn | xid | resource_manager | record_type | record_length | main_data_length | fpi_length | description
-----------+-----------+-----------+-----+------------------+--------------+---------------+------------------+------------+---------------------
0/14FA118 | 0/14FB4B0 | 0/14F9958 | 725 | Btree | INSERT_LEAF | 5013 | 2 | 4960 | off 246
0/14FB4B0 | 0/14FD050 | 0/14FA118 | 725 | Btree | INSERT_LEAF | 7045 | 2 | 6992 | off 130
@ -189,7 +189,7 @@ postgres=# select start_lsn, end_lsn, prev_lsn, xid, resource_manager, record_ty
follows:
<screen>
postgres=# select * from pg_get_wal_stats('0/12FBA30', '0/15011D7') where count > 0;
resource_manager/record_type | count | count_percentage | record_size | record_size_percentage | fpi_size | fpi_size_percentage | combined_size | combined_size_percentage
resource_manager/record_type | count | count_percentage | record_size | record_size_percentage | fpi_size | fpi_size_percentage | combined_size | combined_size_percentage
------------------------------+-------+------------------+-------------+------------------------+----------+---------------------+---------------+--------------------------
XLOG | 10 | 0.10871929 | 796 | 0.052369177 | 352 | 0.061031006 | 1148 | 0.054751817
Transaction | 187 | 2.0330508 | 62773 | 4.1298623 | 0 | 0 | 62773 | 2.9938467
@ -206,7 +206,7 @@ With <replaceable>per_record</replaceable> passed as <literal>true</literal>:
<screen>
postgres=# select * from pg_get_wal_stats('0/14AFC30', '0/15011D7', true) where count > 0;
resource_manager/record_type | count | count_percentage | record_size | record_size_percentage | fpi_size | fpi_size_percentage | combined_size | combined_size_percentage
resource_manager/record_type | count | count_percentage | record_size | record_size_percentage | fpi_size | fpi_size_percentage | combined_size | combined_size_percentage
------------------------------+-------+------------------+-------------+------------------------+----------+---------------------+---------------+--------------------------
XLOG/CHECKPOINT_SHUTDOWN | 1 | 0.32894737 | 114 | 0.22891566 | 0 | 0 | 114 | 0.03534489
XLOG/CHECKPOINT_ONLINE | 4 | 1.3157895 | 456 | 0.91566265 | 0 | 0 | 456 | 0.14137957

14
doc/src/sgml/planstats.sgml

@ -490,7 +490,7 @@ SELECT relpages, reltuples FROM pg_class WHERE relname = 't';
<programlisting>
EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;------------
Seq Scan on t (cost=0.00..170.00 rows=100 width=8) (actual rows=100 loops=1)
Filter: (a = 1)
@ -507,7 +507,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1;
<programlisting>
EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;----------
Seq Scan on t (cost=0.00..195.00 rows=1 width=8) (actual rows=100 loops=1)
Filter: ((a = 1) AND (b = 1))
@ -531,7 +531,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1;
CREATE STATISTICS stts (dependencies) ON a, b FROM t;
ANALYZE t;
EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;------------
Seq Scan on t (cost=0.00..195.00 rows=100 width=8) (actual rows=100 loops=1)
Filter: ((a = 1) AND (b = 1))
@ -552,7 +552,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1;
accurate:
<programlisting>
EXPLAIN (ANALYZE, TIMING OFF) SELECT COUNT(*) FROM t GROUP BY a;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;----------------------
HashAggregate (cost=195.00..196.00 rows=100 width=12) (actual rows=100 loops=1)
Group Key: a
@ -563,7 +563,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT COUNT(*) FROM t GROUP BY a;
in the following example, is off by an order of magnitude:
<programlisting>
EXPLAIN (ANALYZE, TIMING OFF) SELECT COUNT(*) FROM t GROUP BY a, b;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;-------------------------
HashAggregate (cost=220.00..230.00 rows=1000 width=16) (actual rows=100 loops=1)
Group Key: a, b
@ -576,7 +576,7 @@ DROP STATISTICS stts;
CREATE STATISTICS stts (dependencies, ndistinct) ON a, b FROM t;
ANALYZE t;
EXPLAIN (ANALYZE, TIMING OFF) SELECT COUNT(*) FROM t GROUP BY a, b;
QUERY PLAN
QUERY PLAN
-------------------------------------------------------------------&zwsp;-------------------------
HashAggregate (cost=220.00..221.00 rows=100 width=16) (actual rows=100 loops=1)
Group Key: a, b
@ -637,7 +637,7 @@ EXPLAIN (ANALYZE, TIMING OFF) SELECT * FROM t WHERE a = 1 AND b = 1;
<programlisting>
SELECT m.* FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid),
pg_mcv_list_items(stxdmcv) m WHERE stxname = 'stts2';
index | values | nulls | frequency | base_frequency
index | values | nulls | frequency | base_frequency
-------+----------+-------+-----------+----------------
0 | {0, 0} | {f,f} | 0.01 | 0.0001
1 | {1, 1} | {f,f} | 0.01 | 0.0001

2
doc/src/sgml/plperl.sgml

@ -709,7 +709,7 @@ SELECT init_hosts_query();
SELECT query_hosts('192.168.1.0/30');
SELECT release_hosts_query();
query_hosts
query_hosts
-----------------
(1,192.168.1.1)
(2,192.168.1.2)

4
doc/src/sgml/plpgsql.sgml

@ -5352,9 +5352,9 @@ WARNING: number of source and target fields in assignment does not match
DETAIL: strict_multi_assignment check of extra_warnings is active.
HINT: Make sure the query returns the exact list of columns.
foo
foo
-----
(1 row)
</programlisting>