Skip to content

Commit 836af97

Browse files
committed
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 5a892c9. Discussion: https://postgr.es/m/[email protected]
1 parent 6c0f9f6 commit 836af97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+275
-279
lines changed

.gitattributes

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
* whitespace=space-before-tab,trailing-space
22
*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
33
*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
4+
*.pm whitespace=space-before-tab,trailing-space,tabwidth=4
45
*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
5-
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
6+
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent
67
*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent
78

89
# Avoid confusing ASCII underlines with leftover merge conflict markers
@@ -17,17 +18,13 @@ src/backend/utils/Gen_dummy_probes.pl.prolog whitespace=-blank-at-eof
1718

1819
# Test output files that contain extra whitespace
1920
*.out -whitespace
20-
contrib/*/output/*.source -whitespace
21-
src/pl/plpgsql/src/output/*.source -whitespace
22-
src/test/regress/output/*.source -whitespace
2321
src/interfaces/ecpg/test/expected/* -whitespace
2422
src/interfaces/libpq/test/expected.out whitespace=-blank-at-eof
2523

2624
# These files are maintained or generated elsewhere. We take them as is.
2725
configure -whitespace
2826
ppport.h -whitespace
2927
src/backend/regex/COPYRIGHT -whitespace
30-
src/backend/regex/re_syntax.n -whitespace
3128
src/backend/snowball/libstemmer/*.c -whitespace
3229
src/backend/utils/mb/Unicode/*-std.txt -whitespace
3330
src/include/snowball/libstemmer/* -whitespace

doc/src/sgml/advanced.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM emps
344344
</programlisting>
345345

346346
<screen>
347-
depname | empno | salary | avg
347+
depname | empno | salary | avg
348348
-----------+-------+--------+-----------------------
349349
develop | 11 | 5200 | 5020.0000000000000000
350350
develop | 7 | 4200 | 5020.0000000000000000
@@ -394,7 +394,7 @@ FROM empsalary;
394394
</programlisting>
395395

396396
<screen>
397-
depname | empno | salary | rank
397+
depname | empno | salary | rank
398398
-----------+-------+--------+------
399399
develop | 8 | 6000 | 1
400400
develop | 10 | 5200 | 2
@@ -458,7 +458,7 @@ SELECT salary, sum(salary) OVER () FROM empsalary;
458458
</programlisting>
459459

460460
<screen>
461-
salary | sum
461+
salary | sum
462462
--------+-------
463463
5200 | 47100
464464
5000 | 47100
@@ -487,7 +487,7 @@ SELECT salary, sum(salary) OVER (ORDER BY salary) FROM empsalary;
487487
</programlisting>
488488

489489
<screen>
490-
salary | sum
490+
salary | sum
491491
--------+-------
492492
3500 | 3500
493493
3900 | 7400

doc/src/sgml/backup.sgml

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

doc/src/sgml/bloom.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ SELECT 10000000
116116
A sequential scan over this large table takes a long time:
117117
<programlisting>
118118
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
119-
QUERY PLAN
119+
QUERY PLAN
120120
-------------------------------------------------------------------&zwsp;-----------------------------------
121121
Seq Scan on tbloom (cost=0.00..2137.14 rows=3 width=24) (actual time=16.971..16.971 rows=0 loops=1)
122122
Filter: ((i2 = 898732) AND (i5 = 123451))
@@ -139,7 +139,7 @@ CREATE INDEX
139139
3976 kB
140140
(1 row)
141141
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
142-
QUERY PLAN
142+
QUERY PLAN
143143
-------------------------------------------------------------------&zwsp;-----------------------------------
144144
Seq Scan on tbloom (cost=0.00..2137.00 rows=2 width=24) (actual time=12.805..12.805 rows=0 loops=1)
145145
Filter: ((i2 = 898732) AND (i5 = 123451))
@@ -162,7 +162,7 @@ CREATE INDEX
162162
1584 kB
163163
(1 row)
164164
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
165-
QUERY PLAN
165+
QUERY PLAN
166166
-------------------------------------------------------------------&zwsp;--------------------------------------------------
167167
Bitmap Heap Scan on tbloom (cost=1792.00..1799.69 rows=2 width=24) (actual time=0.388..0.388 rows=0 loops=1)
168168
Recheck Cond: ((i2 = 898732) AND (i5 = 123451))
@@ -195,7 +195,7 @@ CREATE INDEX
195195
=# CREATE INDEX btreeidx6 ON tbloom (i6);
196196
CREATE INDEX
197197
=# EXPLAIN ANALYZE SELECT * FROM tbloom WHERE i2 = 898732 AND i5 = 123451;
198-
QUERY PLAN
198+
QUERY PLAN
199199
-------------------------------------------------------------------&zwsp;--------------------------------------------------------
200200
Bitmap Heap Scan on tbloom (cost=24.34..32.03 rows=2 width=24) (actual time=0.028..0.029 rows=0 loops=1)
201201
Recheck Cond: ((i5 = 123451) AND (i2 = 898732))

doc/src/sgml/charset.sgml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1574,13 +1574,13 @@ CREATE DATABASE korean WITH ENCODING 'EUC_KR' LC_COLLATE='ko_KR.euckr' LC_CTYPE=
15741574
<screen>
15751575
$ <userinput>psql -l</userinput>
15761576
List of databases
1577-
Name | Owner | Encoding | Collation | Ctype | Access Privileges
1577+
Name | Owner | Encoding | Collation | Ctype | Access Privileges
15781578
-----------+----------+-----------+-------------+-------------+-------------------------------------
1579-
clocaledb | hlinnaka | SQL_ASCII | C | C |
1580-
englishdb | hlinnaka | UTF8 | en_GB.UTF8 | en_GB.UTF8 |
1581-
japanese | hlinnaka | UTF8 | ja_JP.UTF8 | ja_JP.UTF8 |
1582-
korean | hlinnaka | EUC_KR | ko_KR.euckr | ko_KR.euckr |
1583-
postgres | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 |
1579+
clocaledb | hlinnaka | SQL_ASCII | C | C |
1580+
englishdb | hlinnaka | UTF8 | en_GB.UTF8 | en_GB.UTF8 |
1581+
japanese | hlinnaka | UTF8 | ja_JP.UTF8 | ja_JP.UTF8 |
1582+
korean | hlinnaka | EUC_KR | ko_KR.euckr | ko_KR.euckr |
1583+
postgres | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 |
15841584
template0 | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 | {=c/hlinnaka,hlinnaka=CTc/hlinnaka}
15851585
template1 | hlinnaka | UTF8 | fi_FI.UTF8 | fi_FI.UTF8 | {=c/hlinnaka,hlinnaka=CTc/hlinnaka}
15861586
(7 rows)

doc/src/sgml/datatype.sgml

+16-16
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,7 @@ CREATE TABLE person (
31773177
);
31783178
INSERT INTO person VALUES ('Moe', 'happy');
31793179
SELECT * FROM person WHERE current_mood = 'happy';
3180-
name | current_mood
3180+
name | current_mood
31813181
------+--------------
31823182
Moe | happy
31833183
(1 row)
@@ -3198,14 +3198,14 @@ SELECT * FROM person WHERE current_mood = 'happy';
31983198
INSERT INTO person VALUES ('Larry', 'sad');
31993199
INSERT INTO person VALUES ('Curly', 'ok');
32003200
SELECT * FROM person WHERE current_mood > 'sad';
3201-
name | current_mood
3201+
name | current_mood
32023202
-------+--------------
32033203
Moe | happy
32043204
Curly | ok
32053205
(2 rows)
32063206

32073207
SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood;
3208-
name | current_mood
3208+
name | current_mood
32093209
-------+--------------
32103210
Curly | ok
32113211
Moe | happy
@@ -3214,7 +3214,7 @@ SELECT * FROM person WHERE current_mood > 'sad' ORDER BY current_mood;
32143214
SELECT name
32153215
FROM person
32163216
WHERE current_mood = (SELECT MIN(current_mood) FROM person);
3217-
name
3217+
name
32183218
-------
32193219
Larry
32203220
(1 row)
@@ -3253,7 +3253,7 @@ ERROR: operator does not exist: mood = happiness
32533253
<programlisting>
32543254
SELECT person.name, holidays.num_weeks FROM person, holidays
32553255
WHERE person.current_mood::text = holidays.happiness::text;
3256-
name | num_weeks
3256+
name | num_weeks
32573257
------+-----------
32583258
Moe | 4
32593259
(1 row)
@@ -3982,7 +3982,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
39823982
<programlisting>
39833983
SELECT macaddr8_set7bit('08:00:2b:01:02:03');
39843984
<computeroutput>
3985-
macaddr8_set7bit
3985+
macaddr8_set7bit
39863986
-------------------------
39873987
0a:00:2b:ff:fe:01:02:03
39883988
(1 row)
@@ -4124,7 +4124,7 @@ SELECT 'a fat cat sat on a mat and ate a fat rat'::tsvector;
41244124

41254125
<programlisting>
41264126
SELECT $$the lexeme ' ' contains spaces$$::tsvector;
4127-
tsvector
4127+
tsvector
41284128
-------------------------------------------
41294129
' ' 'contains' 'lexeme' 'spaces' 'the'
41304130
</programlisting>
@@ -4135,7 +4135,7 @@ SELECT $$the lexeme ' ' contains spaces$$::tsvector;
41354135

41364136
<programlisting>
41374137
SELECT $$the lexeme 'Joe''s' contains a quote$$::tsvector;
4138-
tsvector
4138+
tsvector
41394139
------------------------------------------------
41404140
'Joe''s' 'a' 'contains' 'lexeme' 'quote' 'the'
41414141
</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
41654165

41664166
<programlisting>
41674167
SELECT 'a:1A fat:2B,4C cat:5D'::tsvector;
4168-
tsvector
4168+
tsvector
41694169
----------------------------
41704170
'a':1A 'cat':5 'fat':2B,4C
41714171
</programlisting>
@@ -4184,7 +4184,7 @@ SELECT 'a:1A fat:2B,4C cat:5D'::tsvector;
41844184

41854185
<programlisting>
41864186
SELECT 'The Fat Rats'::tsvector;
4187-
tsvector
4187+
tsvector
41884188
--------------------
41894189
'Fat' 'Rats' 'The'
41904190
</programlisting>
@@ -4197,7 +4197,7 @@ SELECT 'The Fat Rats'::tsvector;
41974197

41984198
<programlisting>
41994199
SELECT to_tsvector('english', 'The Fat Rats');
4200-
to_tsvector
4200+
to_tsvector
42014201
-----------------
42024202
'fat':2 'rat':3
42034203
</programlisting>
@@ -4239,17 +4239,17 @@ SELECT to_tsvector('english', 'The Fat Rats');
42394239

42404240
<programlisting>
42414241
SELECT 'fat &amp; rat'::tsquery;
4242-
tsquery
4242+
tsquery
42434243
---------------
42444244
'fat' &amp; 'rat'
42454245

42464246
SELECT 'fat &amp; (rat | cat)'::tsquery;
4247-
tsquery
4247+
tsquery
42484248
---------------------------
42494249
'fat' &amp; ( 'rat' | 'cat' )
42504250

42514251
SELECT 'fat &amp; rat &amp; ! cat'::tsquery;
4252-
tsquery
4252+
tsquery
42534253
------------------------
42544254
'fat' &amp; 'rat' &amp; !'cat'
42554255
</programlisting>
@@ -4273,7 +4273,7 @@ SELECT 'fat:ab &amp; cat'::tsquery;
42734273
to specify prefix matching:
42744274
<programlisting>
42754275
SELECT 'super:*'::tsquery;
4276-
tsquery
4276+
tsquery
42774277
-----------
42784278
'super':*
42794279
</programlisting>
@@ -4290,7 +4290,7 @@ SELECT 'super:*'::tsquery;
42904290

42914291
<programlisting>
42924292
SELECT to_tsquery('Fat:ab &amp; Cats');
4293-
to_tsquery
4293+
to_tsquery
42944294
------------------
42954295
'fat':AB &amp; 'cat'
42964296
</programlisting>

doc/src/sgml/dblink.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ GRANT SELECT ON TABLE foo TO regress_dblink_user;
161161
\set ORIGINAL_USER :USER
162162
\c - regress_dblink_user
163163
SELECT dblink_connect('myconn', 'fdtest');
164-
dblink_connect
164+
dblink_connect
165165
----------------
166166
OK
167167
(1 row)
168168

169169
SELECT * FROM dblink('myconn', 'SELECT * FROM foo') AS t(a int, b text, c text[]);
170-
a | b | c
170+
a | b | c
171171
----+---+---------------
172172
0 | a | {a0,b0,c0}
173173
1 | b | {a1,b1,c1}
@@ -1397,7 +1397,7 @@ dblink_get_notify(text connname) returns setof (notify_name text, be_pid int, ex
13971397

13981398
<screen>
13991399
SELECT dblink_exec('LISTEN virtual');
1400-
dblink_exec
1400+
dblink_exec
14011401
-------------
14021402
LISTEN
14031403
(1 row)

doc/src/sgml/ddl.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2619,13 +2619,13 @@ CREATE POLICY admin_local_only ON passwd AS RESTRICTIVE TO admin
26192619

26202620
<programlisting>
26212621
=&gt; SELECT current_user;
2622-
current_user
2622+
current_user
26232623
--------------
26242624
admin
26252625
(1 row)
26262626

26272627
=&gt; select inet_client_addr();
2628-
inet_client_addr
2628+
inet_client_addr
26292629
------------------
26302630
127.0.0.1
26312631
(1 row)

doc/src/sgml/fdwhandler.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ ExecForeignTruncate(List *rels,
10891089
requested in the original <command>TRUNCATE</command> command,
10901090
respectively.
10911091
</para>
1092-
1092+
10931093
<para>
10941094
If <literal>restart_seqs</literal> is <literal>true</literal>,
10951095
the original <command>TRUNCATE</command> command requested the

0 commit comments

Comments
 (0)