[DOCS] Errors in documentation

2017-08-23 Thread Alexander Lakhin

Hello,

Please consider committing attached patches to the documentation.
A pair of the patches I sent before (see 
https://www.postgresql.org/message-id/374e84e6-f89b-4d0a-652c-cb2449f0bfc4%40gmail.com), 
but they weren't committed.
If some of these patches are not valid or raise any questions, please 
let me know.


Best

--
Alexander Lakhin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 6960032..dae6307 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -620,8 +620,8 @@ ALTER TABLE [ IF EXISTS ] name
   SHARE UPDATE EXCLUSIVE lock will be taken for
   fillfactor and autovacuum storage parameters, as well as the
   following planner related parameters:
-  effective_io_concurrency, parallel_workers, seq_page_cost
-  random_page_cost, n_distinct and n_distinct_inherited.
+  effective_io_concurrency, parallel_workers, seq_page_cost,
+  random_page_cost, n_distinct and n_distinct_inherited.
  
 
  
diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml
index 3a04d07..190c8d6 100644
--- a/doc/src/sgml/ref/alter_sequence.sgml
+++ b/doc/src/sgml/ref/alter_sequence.sgml
@@ -89,7 +89,7 @@ ALTER SEQUENCE [ IF EXISTS ] name S
 The optional
 clause AS data_type
 changes the data type of the sequence.  Valid types are
-are smallint, integer,
+smallint, integer,
 and bigint.

 
diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml
index f1448e7..2af8c8d 100644
--- a/doc/src/sgml/ref/create_sequence.sgml
+++ b/doc/src/sgml/ref/create_sequence.sgml
@@ -119,7 +119,7 @@ SELECT * FROM name;
   The optional
   clause AS data_type
   specifies the data type of the sequence.  Valid types are
-  are smallint, integer,
+  smallint, integer,
   and bigint.  bigint is the
   default.  The data type determines the default minimum and maximum
   values of the sequence.
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index ef7054c..3126990 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -5385,7 +5385,7 @@ SCRAM-SHA-256$:<
 
  
   pubname
-  Name
+  name
   
   Name of the publication
  
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index 8de1150..732efe6 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -482,7 +482,7 @@ COPY count

 For identity columns, the COPY FROM command will always
 write the column values provided in the input data, like
-the INPUT option OVERRIDING SYSTEM
+the INSERT option OVERRIDING SYSTEM
 VALUE.

 
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index e9c2c49..a6ca590 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -473,8 +473,8 @@ FROM ( { numeric_literal | partitioned table.  The parenthesized list of
   columns or expressions forms the partition key
   for the table.  When using range partitioning, the partition key can
-  include multiple columns or expressions (up to 32, but this limit can
-  altered when building PostgreSQL.), but for
+  include multiple columns or expressions (up to 32, but this limit can be
+  altered when building PostgreSQL), but for
   list partitioning, the partition key must consist of a single column or
   expression.  If no B-tree operator class is specified when creating a
   partitioned table, the default B-tree operator class for the datatype will
diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml
index 3ed14f0..c7b880d 100644
--- a/doc/src/sgml/event-trigger.sgml
+++ b/doc/src/sgml/event-trigger.sgml
@@ -565,6 +565,7 @@
 X
 -
 -
+


 CREATE USER MAPPING
diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml
index 14a9b9d..7fd4dee 100644
--- a/doc/src/sgml/release-9.5.sgml
+++ b/doc/src/sgml/release-9.5.sgml
@@ -6918,7 +6918,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
 -->
   
Add pg_rewind,
-   which allows re-synchronizing a master server after failback
+   which allows re-synchronizing a master server after fallback
(Heikki Linnakangas)
   
  
diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index ac51258..aa3d371 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -559,7 +559,7 @@ amgettuple (IndexScanDesc scan,
a HeapTuple pointer stored at scan->xs_hitup,
with tuple descriptor scan->xs_hitupdesc.  (The latter
format should be used when reconstructing data that might possibly not fit
-   into an IndexTu

[DOCS] Int32 type unclear about signedness

2017-08-23 Thread rsto
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/protocol-message-types.html
Description:

The specification of the Int32 Message data type in section 51.4 of the
current documentation does to specify signedness (see [1]).

Both its C-like name and its use for negative values in several protocol 3
messages make assuming signedness only reasonable. Yet, when used for
message lengths, the libpq code seems unclear:

The libpq frontend reads message lengths from the backend as 4 bytes into a
signed int (see [2]). It checks if the length exceeds 3 and allows
excessive message lengths only for some messages.

Yet, the related backend code uses a uint32_t to transmit the length value
of a size_t (see [3]). This suggests that UINT32_MAX lengths would
theoretically be possible and driver implementations would need to handle
it.

I'm almost certain that signed ints are meant, but it might not hurt to
explicitly state it in section 51.4. Furthermore, the restriction of certain
message lengths to 3 is not documented.

Did I oversee something in the docs? Otherwise, I'd be happy to send a patch
with a suggested change in the documentation.

[1] https://www.postgresql.org/docs/9.6/static/protocol-message-types.html
[2]
https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-protocol3.c#L1985
[3]
https://github.com/postgres/postgres/blob/master/src/backend/libpq/pqcomm.c#L1570

P.S.: Thanks for PostgreSQL, such a great tool!

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs