commit a2c9a2216b301d15bca91e1aaedbb09f0c7fabaf
Author: Shigeru HANADA <shigeru.hanada@gmail.com>
Date:   Wed Jul 9 17:32:30 2014 +0900

    Fix typos.

diff --git a/contrib/ctidscan/ctidscan.c b/contrib/ctidscan/ctidscan.c
index 327a6d2..5151365 100644
--- a/contrib/ctidscan/ctidscan.c
+++ b/contrib/ctidscan/ctidscan.c
@@ -270,7 +270,7 @@ CTidEstimateCosts(PlannerInfo *root,
 	{
 		/*
 		 * Just a rough estimation. We assume half of records shall be
-		 * read using this restriction clause, but undeterministic untill
+		 * read using this restriction clause, but indeterministic until
 		 * executor run it actually.
 		 */
 		num_pages = Max((baserel->pages + 1) / 2, 1);
@@ -491,7 +491,7 @@ CopyCtidScanPlan(const CustomPlan *from)
 
 /*
  * BeginCtidScan - A method of CustomPlanState; that initializes
- * the supplied CtidScanState object, at begining of the executor.
+ * the supplied CtidScanState object, at beginning of the executor.
  */
 static void
 BeginCtidScan(CustomPlanState *node, EState *estate, int eflags)
diff --git a/doc/src/sgml/custom-plan.sgml b/doc/src/sgml/custom-plan.sgml
index 320e5de..d86495b 100644
--- a/doc/src/sgml/custom-plan.sgml
+++ b/doc/src/sgml/custom-plan.sgml
@@ -38,8 +38,8 @@
   </para>
   <para>
    Handler function has to be declared as a function that takes one
-   <literal>internal</> datatype and returns <literal>void</>.
-   On invocation, query planner derivers a pointer of data structure
+   <literal>internal</> data type and returns <literal>void</>.
+   On invocation, query planner delivers a pointer of data structure
    according to the custom plan class, custom-plan handler function will
    decide whether it can offer alternative execution path towards the
    required task. If available, it can add a <literal>CustomPath</>
@@ -74,8 +74,8 @@
   <para>
    A handler function that was specified on
    the <xref linkend="sql-createcustomplanprovider"> command is
-   declared to return <literal>void</> datatype and takes an
-   <literal>internal</> datatype; that is usually applied to exchange
+   declared to return <literal>void</> data type and takes an
+   <literal>internal</> data type; that is usually applied to exchange
    internal data structure.
    This handler function is not an exception. It can reference a pointer
    being informed via function argument to understand the context.
@@ -104,7 +104,7 @@ typedef struct {
    The custom-plan provider being invoked can check whether it can
    provides alternative way to scan the relation. If available, it
    shall construct <literal>CustomPath</> or its inherited one with
-   estimated cost and callbacks below, then reguster the path using
+   estimated cost and callbacks below, then register the path using
    <literal>add_path</> towards the supplied <literal>RelOptInfo</>.
   </para>
  </sect1>
@@ -121,7 +121,7 @@ Node *
 CreateCustomPlan(PlannerInfo *root,
                  CustomPath *best_path);
 </programlisting>
-   It populates a <literal>CustomPlan</> (or inherited datatype) node
+   It populates a <literal>CustomPlan</> (or inherited data type) node
    according to the supplied <literal>CustomPath</> node which was
    constructed on the custom plan handler function then chosen by the
    query planner.
@@ -224,7 +224,7 @@ FinalizeCustomPlan(PlannerInfo *root,
 Node *
 CreateCustomPlanState(CustomPlan *custom_plan);
 </programlisting>
-   It populates a <literal>CustomPlanState</> (or inherited datatype)
+   It populates a <literal>CustomPlanState</> (or inherited data type)
    node according to the supplied <literal>CustomPlan</> node preliminary
    constructed, on the beginning of query executor.
    Only custom plan provider can know exact size of the node to be
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index 4b2e57e..d6beb53 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -2161,7 +2161,7 @@ init_custom_plan_callchain(void)
  * call_custom_scan_providers
  *
  * A callchain on relation scan. custom-plan provider can add alternative
- * scan paths derivered from CustomPath class.
+ * scan paths derived from CustomPath class.
  */
 void
 call_custom_scan_providers(PlannerInfo *root,
