[HACKERS] fix typos in comments

2015-04-26 Thread Dmitriy Olshevskiy

Hello!

Please see this patch with several typos and 
mistakes in comments.


There are also typos in sgml files (duplicate to):
1. doc/src/sgml/logicaldecoding.sgml, ln 619
 Logical decoding can be used to to build
2. doc/src/sgml/ref/pg_dumpall.sgml, ln 457
 Specifies the name of the database to connect 
to to dump global


--
Dmitriy Olshevskiy

From 2558366552ce00bff5c57a98dea72f959e3c72e7 Mon Sep 17 00:00:00 2001
From: olshevskiy87 olshevski...@bk.ru
Date: Sun, 26 Apr 2015 18:40:07 +0400
Subject: [PATCH] fix typos in comments

---
 src/backend/access/brin/brin_tuple.c  | 2 +-
 src/backend/access/nbtree/nbtree.c| 2 +-
 src/backend/access/transam/twophase.c | 2 +-
 src/backend/catalog/objectaddress.c   | 4 ++--
 src/backend/commands/indexcmds.c  | 2 +-
 src/backend/executor/nodeModifyTable.c| 2 +-
 src/backend/libpq/pqcomm.c| 2 +-
 src/backend/optimizer/geqo/geqo_erx.c | 2 +-
 src/backend/postmaster/bgworker.c | 2 +-
 src/backend/replication/logical/snapbuild.c   | 2 +-
 src/backend/storage/lmgr/lwlock.c | 4 ++--
 src/backend/utils/cache/inval.c   | 2 +-
 src/bin/pg_archivecleanup/pg_archivecleanup.c | 2 +-
 src/bin/pg_basebackup/pg_recvlogical.c| 4 ++--
 src/bin/pg_upgrade/parallel.c | 2 +-
 src/bin/pg_upgrade/relfilenode.c  | 2 +-
 src/include/access/attnum.h   | 6 +++---
 src/include/access/xact.h | 2 +-
 src/include/mb/pg_wchar.h | 2 +-
 src/include/storage/s_lock.h  | 4 ++--
 src/interfaces/ecpg/pgtypeslib/datetime.c | 2 +-
 src/interfaces/ecpg/pgtypeslib/numeric.c  | 2 +-
 src/port/pgmkdirp.c   | 2 +-
 23 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c
index 93f00f6..08fa998 100644
--- a/src/backend/access/brin/brin_tuple.c
+++ b/src/backend/access/brin/brin_tuple.c
@@ -304,7 +304,7 @@ brin_free_tuple(BrinTuple *tuple)
 }
 
 /*
- * Create an palloc'd copy of a BrinTuple.
+ * Create a palloc'd copy of a BrinTuple.
  */
 BrinTuple *
 brin_copy_tuple(BrinTuple *tuple, Size len)
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 9a6dcdd..c2d52fa 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -40,7 +40,7 @@ typedef struct
 	BTSpool*spool;
 
 	/*
-	 * spool2 is needed only when the index is an unique index. Dead tuples
+	 * spool2 is needed only when the index is a unique index. Dead tuples
 	 * are put into spool2 instead of spool in order to avoid uniqueness
 	 * check.
 	 */
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 3ac339b..d9a3fab 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -291,7 +291,7 @@ AtAbort_Twophase(void)
 }
 
 /*
- * This is called after we have finished transfering state to the prepared
+ * This is called after we have finished transferring state to the prepared
  * PGXACT entry.
  */
 void
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index 30cb699..816ab50 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -99,7 +99,7 @@ typedef struct
 	AclObjectKind acl_kind;		/* ACL_KIND_* of this object type */
 	bool		is_nsp_name_unique;		/* can the nsp/name combination (or
 		 * name alone, if there's no
-		 * namespace) be considered an unique
+		 * namespace) be considered a unique
 		 * identifier for an object of this
 		 * class? */
 } ObjectPropertyType;
@@ -3200,7 +3200,7 @@ pg_identify_object(PG_FUNCTION_ARGS)
 
 			/*
 			 * We only return the object name if it can be used (together with
-			 * the schema name, if any) as an unique identifier.
+			 * the schema name, if any) as a unique identifier.
 			 */
 			if (get_object_namensp_unique(address.classId))
 			{
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 99acd4a..351d48e 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -1051,7 +1051,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo,
  */
 
 /*
- * A expression using mutable functions is probably wrong,
+ * An expression using mutable functions is probably wrong,
  * since if you aren't going to get the same result for the
  * same data every time, it's not clear what the index entries
  * mean at all.
diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c
index 06ec82e..31666ed 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -304,7 +304,7 @@ ExecInsert(TupleTableSlot *slot,
 	 * inserting the record into the heap and all indexes

[HACKERS] fix typos

2015-05-17 Thread Dmitriy Olshevskiy

Hello. Please, see this patch with typos.
Thank you.

--
Dmitriy Olshevskiy

From e9c463e50efdaa1fbdcabea92cd95cbffea3d3bd Mon Sep 17 00:00:00 2001
From: olshevskiy87 olshevski...@bk.ru
Date: Sun, 17 May 2015 15:40:40 +0400
Subject: [PATCH] fix typos

---
 contrib/tsm_system_time/tsm_system_time.c   |  2 +-
 doc/src/sgml/logicaldecoding.sgml   |  2 +-
 doc/src/sgml/ref/pg_dumpall.sgml|  2 +-
 src/backend/access/gin/ginpostinglist.c | 14 +++---
 src/backend/access/heap/heapam.c|  2 +-
 src/backend/access/nbtree/README|  2 +-
 src/backend/access/transam/xact.c   |  4 ++--
 src/backend/replication/logical/snapbuild.c |  2 +-
 src/backend/tsearch/dict_synonym.c  |  2 +-
 src/backend/utils/adt/jsonfuncs.c   |  2 +-
 src/test/regress/expected/event_trigger.out |  2 +-
 src/test/regress/sql/event_trigger.sql  |  2 +-
 12 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/contrib/tsm_system_time/tsm_system_time.c b/contrib/tsm_system_time/tsm_system_time.c
index efb127c..9af9e74 100644
--- a/contrib/tsm_system_time/tsm_system_time.c
+++ b/contrib/tsm_system_time/tsm_system_time.c
@@ -267,7 +267,7 @@ tsm_system_time_cost(PG_FUNCTION_ARGS)
 			  NULL);
 
 	/*
-	 * Assumption here is that we'll never read less then 1% of table pages,
+	 * Assumption here is that we'll never read less than 1% of table pages,
 	 * this is here mainly because it is much less bad to overestimate than
 	 * underestimate and using just spc_random_page_cost will probably lead
 	 * to underestimations in general.
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 00f6eee..5fa2f77 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -649,7 +649,7 @@ OutputPluginWrite(ctx, true);
titleSynchronous Replication Support for Logical Decoding/title
 
para
-Logical decoding can be used to to build
+Logical decoding can be used to build
 link linkend=synchronous-replicationsynchronous
 replication/link solutions with the same user interface as synchronous
 replication for link linkend=streaming-replicationstreaming
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index fcf5f77..0444f09 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -454,7 +454,7 @@ PostgreSQL documentation
   termoption--database=replaceabledbname/replaceable/option/term
   listitem
para
- Specifies the name of the database to connect to to dump global
+ Specifies the name of the database to connect to dump global
  objects and discover what other databases should be dumped. If
  not specified, the literalpostgres/literal database will be used,
  and if that does not exist, literaltemplate1/literal will be used.
diff --git a/src/backend/access/gin/ginpostinglist.c b/src/backend/access/gin/ginpostinglist.c
index 6337b1a..e6d7c1a 100644
--- a/src/backend/access/gin/ginpostinglist.c
+++ b/src/backend/access/gin/ginpostinglist.c
@@ -23,7 +23,7 @@
 /*
  * For encoding purposes, item pointers are represented as 64-bit unsigned
  * integers. The lowest 11 bits represent the offset number, and the next
- * lowest 32 bits are the block number. That leaves 17 bits unused, ie.
+ * lowest 32 bits are the block number. That leaves 17 bits unused, i.e.
  * only 43 low bits are used.
  *
  * These 43-bit integers are encoded using varbyte encoding. In each byte,
@@ -51,16 +51,16 @@
  * Removing number is actually replacement of two numbers with their sum. We
  * have to prove that varbyte encoding of a sum can't be longer than varbyte
  * encoding of its summands. Sum of two numbers is at most one bit wider than
- * than the larger of the summands. Widening a number by one bit enlarges its
- * length in varbyte encoding by at most one byte. Therefore, varbyte encoding
- * of sum is at most one byte longer than varbyte encoding of larger summand.
- * Lesser summand is at least one byte, so the sum cannot take more space than
- * the summands, Q.E.D.
+ * the larger of the summands. Widening a number by one bit enlarges its length
+ * in varbyte encoding by at most one byte. Therefore, varbyte encoding of sum
+ * is at most one byte longer than varbyte encoding of larger summand. Lesser
+ * summand is at least one byte, so the sum cannot take more space than the
+ * summands, Q.E.D.
  *
  * This property greatly simplifies VACUUM, which can assume that posting
  * lists always fit on the same page after vacuuming. Note that even though
  * that holds for removing items from a posting list, you must also be
- * careful to not cause expansion e.g when merging uncompressed items on the
+ * careful to not cause expansion e.g. when merging uncompressed items on the
  * page into the compressed lists, when vacuuming.
  */
 
diff --git a/src/backend/access/heap/heapam.c b/src

[HACKERS] typo in create policy doc

2015-09-12 Thread Dmitriy Olshevskiy

hello.
please check the typo "WTIH CHECK" in CREATE 
POLICY doc 
<http://www.postgresql.org/docs/9.5/static/sql-createpolicy.html> 
(9.5 and devel. version).

patch is in attachments.

--
Dmitriy Olshevskiy

diff --git a/doc/src/sgml/ref/create_policy.sgml b/doc/src/sgml/ref/create_policy.sgml
index 56f0124..629ed80 100644
--- a/doc/src/sgml/ref/create_policy.sgml
+++ b/doc/src/sgml/ref/create_policy.sgml
@@ -305,7 +305,7 @@ CREATE POLICY name ON UPDATE path is taken.  Any existing row that
  necessitates that the UPDATE path be taken must pass
  the (UPDATE or ALL) USING qualifications (combined
- using OR), which are always enforced as WTIH CHECK
+ using OR), which are always enforced as WITH CHECK
  options in this context (the UPDATE path will
  never be silently avoided; an error will be thrown
  instead).  Finally, the final row appended to the relation must pass

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