Hello hackers,

Please consider fixing the next cluster of typos and inconsistencies in
the tree:
5.1. datetkntbl -> datetktbl
5.2. datminxmid -> datminmxid
5.3. DatumGetP -> DatumGetPointer
5.4. ECPG_COMPILE, DECPG_COMPILE -> remove (orphaned since 328d235)
5.5. defer_cleanup_age -> vacuum_defer_cleanup_age
5.6. descriptor_index -> remove (orphaned since 991b974)
5.7. DestroyBuilder, InitBuilder, SetDoc -> DestroyOpaque, InitOpaque,
SetDocument
5.8. dictlexize -> thesaurus_lexize
5.9. regression.diffsregression.planregress/inh -> regression.diffs
planregress/diffs.inh
5.10. dllist -> dlist
5.11. DocRepresentaion -> DocRepresentation
5.12. dosplit -> remove (such function is not present since introduction
in 9892ddf)
5.13. DOWN_MEM_FENCE -> _DOWN_MEM_FENCE
5.14. dp_pg_stop_backup -> do_pg_stop_backup
5.15. DropRelFileNodeAllBuffers -> DropRelFileNodesAllBuffers
5.16. dshash_release -> dshash_release_lock
5.17. EACCESS -> remove (not used since introduction in 12c94238)
5.18. ECPGcheck_PQresult -> ecpg_check_PQresult (renamed in 7793c6ec,
referenced code moved in ecpg_execute() in 61bee9f7)
5.19. ecpg_compatlib -> libecpg_compat
5.20. ECPGerrmsg -> remove (not used since introduction in 244d2d67)
5.21. ecpg_free_auto_mem -> remove (not used since introduction in 7793c6ec)
5.22. ecpggetdescp -> remove (not used since introduction in 90326c01)
5.23. endBlk -> numBlks
5.24. endMemb, startMemb, endOff, startOff -> endTruncMemb,
startTruncMemb, endTruncOff, startTruncOff
5.25. EndPlan -> ExecEndPlan
5.26. EndResult -> ExprEndResult
5.27. equivalentOpersAfterPromotion -> remove (irrelevant since
8536c962, but the whole comments is too old to be informational too)
5.28. es_jit_combined_instr -> es_jit_worker_instr (renamed in c03c1449)
5.29. ExclusiveRowLock -> RowExclusiveLock
5.30. exdended -> extended (user-visible, I would fix it in
REL_12_STABLE too)
5.31. ExecBitmapHeapNext -> BitmapHeapNext
5.32. ExecBuildProjectInfo -> ExecBuildProjectionInfo
5.33. ExecDirection -> remove (this variable is not present since PG95-1_01)
5.34. ExecEndRecursiveUnionScan -> ExecEndRecursiveUnion
5.35. ExecGrantStmt -> ExecuteGrantStmt
5.36. ExecInitRecursiveUnionScan -> ExecInitRecursiveUnion
5.37. ExecSeqNext -> SeqNext
5.38. exec_statement_return -> exec_stmt_return
5.39. exec_subplan_get_plan -> remove (not used since 1cc29fe7)
5.40. ExecSubqueryNext -> SubqueryNext
5.41. ExecValuesNext -> ValuesNext
5.42. existing_oid -> existing_relation_id
5.43. exit_fatal -> fatal
5.44. expectedTLIs -> expectedTLEs
5.45. ExprEvalExpr -> ExecEvalExpr
5.46. exprhasexecparam -> remove (orphaned since 6630ccad)
5.47. ExprReadyExpr -> ExecReadyExpr
5.48. EXTENSION_REALLY_RETURN_NULL -> remove (the behaviour changed with
a7124870)

There are some other ancient comments like spotted in 5.27, e.g. for
textcat(), text_substr() in varlena.c...  It seems that they serve more 
historic than informational purposes today.

Best regards,
Alexander
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 44a3b2c03c..763b8cf7fd 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -910,7 +910,7 @@ Datum
 my_fetch(PG_FUNCTION_ARGS)
 {
     GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-    input_data_type *in = DatumGetP(entry->key);
+    input_data_type *in = DatumGetPointer(entry->key);
     fetched_data_type *fetched_data;
     GISTENTRY  *retval;
 
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fad859a812..7f127e2339 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -2784,7 +2784,7 @@ ReadMultiXactCounts(uint32 *multixacts, MultiXactOffset *members)
 
 /*
  * Multixact members can be removed once the multixacts that refer to them
- * are older than every datminxmid.  autovacuum_multixact_freeze_max_age and
+ * are older than every datminmxid.  autovacuum_multixact_freeze_max_age and
  * vacuum_multixact_freeze_table_age work together to make sure we never have
  * too many multixacts; we hope that, at least under normal circumstances,
  * this will also be sufficient to keep us from using too many offsets.
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index fd85b9c8f4..073f313337 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -1069,7 +1069,7 @@ rebuild_database_list(Oid newdb)
 		current_time = GetCurrentTimestamp();
 
 		/*
-		 * move the elements from the array into the dllist, setting the
+		 * move the elements from the array into the dlist, setting the
 		 * next_worker while walking the array
 		 */
 		for (i = 0; i < nelems; i++)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 18a0f62ba6..6c22cbfa29 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1428,8 +1428,8 @@ GetOldestXmin(Relation rel, int flags)
 		result = replication_slot_xmin;
 
 	/*
-	 * After locks have been released and defer_cleanup_age has been applied,
-	 * check whether we need to back up further to make logical decoding
+	 * After locks have been released and vacuum_defer_cleanup_age has been
+	 * applied, check whether we need to back up further to make logical decoding
 	 * possible. We need to do so if we're computing the global limit (rel =
 	 * NULL) or if the passed relation is a catalog relation of some kind.
 	 */
diff --git a/src/backend/utils/misc/tzparser.c b/src/backend/utils/misc/tzparser.c
index cdb9db475d..0b2900a4b6 100644
--- a/src/backend/utils/misc/tzparser.c
+++ b/src/backend/utils/misc/tzparser.c
@@ -53,7 +53,7 @@ validateTzEntry(tzEntry *tzentry)
 	unsigned char *p;
 
 	/*
-	 * Check restrictions imposed by datetkntbl storage format (see
+	 * Check restrictions imposed by datetktbl storage format (see
 	 * datetime.c)
 	 */
 	if (strlen(tzentry->abbrev) > TOKMAXLEN)
diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h
index 926bd57014..e6fd3d4f01 100644
--- a/src/include/executor/tablefunc.h
+++ b/src/include/executor/tablefunc.h
@@ -20,11 +20,11 @@ struct TableFuncScanState;
  * TableFuncRoutine holds function pointers used for generating content of
  * table-producer functions, such as XMLTABLE.
  *
- * InitBuilder initialize table builder private objects.  The output tuple
+ * InitOpaque initialize table builder private objects.  The output tuple
  * descriptor, input functions for the columns, and typioparams are passed
  * from executor state.
  *
- * SetDoc is called to define the input document.  The table builder may
+ * SetDocument is called to define the input document.  The table builder may
  * apply additional transformations not exposed outside the table builder
  * context.
  *
@@ -45,7 +45,7 @@ struct TableFuncScanState;
  * builder context such that each subsequent GetValue call returns the values
  * for the indicated column for the row being processed.
  *
- * DestroyBuilder shall release all resources associated with a table builder
+ * DestroyOpaque shall release all resources associated with a table builder
  * context.  It may be called either because all rows have been consumed, or
  * because an error occurred while processing the table expression.
  */
diff --git a/src/include/tsearch/ts_public.h b/src/include/tsearch/ts_public.h
index 465a3616a6..531058499f 100644
--- a/src/include/tsearch/ts_public.h
+++ b/src/include/tsearch/ts_public.h
@@ -118,7 +118,7 @@ typedef struct
 
 /*
  * Struct for supporting complex dictionaries like thesaurus.
- * 4th argument for dictlexize method is a pointer to this
+ * 4th argument for thesaurus_lexize method is a pointer to this
  */
 typedef struct
 {
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile
index 20e3b47874..2ec1023626 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -19,7 +19,6 @@ override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
 	-I. -I$(srcdir) \
 	-I$(top_srcdir)/src/interfaces/ecpg/ecpglib \
 	-I$(libpq_srcdir) \
-	-DECPG_COMPILE \
 	$(CPPFLAGS)
 
 override CFLAGS += $(PTHREAD_CFLAGS)
diff --git a/src/interfaces/ecpg/preproc/preproc_extern.h b/src/interfaces/ecpg/preproc/preproc_extern.h
index 552ffc627b..7de5cd5087 100644
--- a/src/interfaces/ecpg/preproc/preproc_extern.h
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -30,7 +30,6 @@ extern int	braces_open,
 			struct_level,
 			ecpg_internal_var;
 extern char *current_function;
-extern char *descriptor_index;
 extern char *descriptor_name;
 extern char *connection;
 extern char *input_filename;
diff --git a/src/test/regress/regressplans.sh b/src/test/regress/regressplans.sh
index 678ab0a3f2..31e7876daa 100755
--- a/src/test/regress/regressplans.sh
+++ b/src/test/regress/regressplans.sh
@@ -72,7 +72,7 @@ mv -f regression.out planregress/out.in
 mv -f regression.diffs planregress/diffs.in
 PGOPTIONS="$PGOPTIONS      -fi -fn     -fh" $MAKE runtest
 mv -f regression.out planregress/out.inh
-mv -f regression.diffsregression.planregress/inh
+mv -f regression.diffs planregress/diffs.inh
 PGOPTIONS="$PGOPTIONS      -fi -fn -fm    " $MAKE runtest
 mv -f regression.out planregress/out.inm
 mv -f regression.diffs planregress/diffs.inm
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 6f928234ee..d1d0aed07e 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -309,7 +309,6 @@ sub mkvcbuild
 	$ecpg->AddIncludeDir('src/interfaces/libpq');
 	$ecpg->AddPrefixInclude('src/interfaces/ecpg/preproc');
 	$ecpg->AddFiles('src/interfaces/ecpg/preproc', 'pgc.l', 'preproc.y');
-	$ecpg->AddDefine('ECPG_COMPILE');
 	$ecpg->AddReference($libpgcommon, $libpgport);
 
 	my $pgregress_ecpg =
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 2be0055c3f..4f49c5981a 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -590,7 +590,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
 			v->spl_nright++;
 		}
 	}
-	*left = *right = FirstOffsetNumber; /* sentinel value, see dosplit() */
+	*left = *right = FirstOffsetNumber; /* sentinel value */
 
 	v->spl_ldatum = PointerGetDatum(datum_l);
 	v->spl_rdatum = PointerGetDatum(datum_r);
diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c
index 24dd372252..350f8c0a66 100644
--- a/src/backend/lib/dshash.c
+++ b/src/backend/lib/dshash.c
@@ -409,7 +409,7 @@ dshash_find(dshash_table *hash_table, const void *key, bool exclusive)
 	}
 	else
 	{
-		/* The caller will free the lock by calling dshash_release. */
+		/* The caller will free the lock by calling dshash_release_lock. */
 		hash_table->find_locked = true;
 		hash_table->find_exclusively_locked = exclusive;
 		return ENTRY_FROM_ITEM(item);
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 7a1b38466b..57f17e1418 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -1074,7 +1074,7 @@ sendDir(const char *path, int basepathlen, bool sizeonly, List *tablespaces,
 		 * error in that case. The error handler further up will call
 		 * do_pg_abort_backup() for us. Also check that if the backup was
 		 * started while still in recovery, the server wasn't promoted.
-		 * dp_pg_stop_backup() will check that too, but it's better to stop
+		 * do_pg_stop_backup() will check that too, but it's better to stop
 		 * the backup early than continue to the end and fail there.
 		 */
 		CHECK_FOR_INTERRUPTS();
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 391b6d6e16..f5f6a29222 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -361,7 +361,7 @@ DropRelFileNodeLocalBuffers(RelFileNode rnode, ForkNumber forkNum,
  *		This function removes from the buffer pool all pages of all forks
  *		of the specified relation.
  *
- *		See DropRelFileNodeAllBuffers in bufmgr.c for more notes.
+ *		See DropRelFileNodesAllBuffers in bufmgr.c for more notes.
  */
 void
 DropRelFileNodeAllLocalBuffers(RelFileNode rnode)
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
index 55a9649879..e28859d8e1 100644
--- a/src/backend/utils/adt/tsrank.c
+++ b/src/backend/utils/adt/tsrank.c
@@ -738,7 +738,7 @@ get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen)
 	doc = (DocRepresentation *) palloc(sizeof(DocRepresentation) * len);
 
 	/*
-	 * Iterate through query to make DocRepresentaion for words and it's
+	 * Iterate through query to make DocRepresentation for words and it's
 	 * entries satisfied by query
 	 */
 	for (i = 0; i < qr->query->size; i++)
diff --git a/src/include/port/atomics/generic-acc.h b/src/include/port/atomics/generic-acc.h
index eec5063cbc..a64c841f4f 100644
--- a/src/include/port/atomics/generic-acc.h
+++ b/src/include/port/atomics/generic-acc.h
@@ -68,7 +68,7 @@ pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr,
 	_Asm_mf();
 	/*
 	 * Notes:
-	 * DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
+	 * _DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
 	 */
 	current =  _Asm_cmpxchg(_SZ_W, /* word */
 							_SEM_REL,
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index f4841fb397..da6b0c90a0 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -85,7 +85,6 @@
 #define IPC_NOWAIT	2048
 #define IPC_STAT 4096
 
-#define EACCESS 2048
 #ifndef EIDRM
 #define EIDRM 4096
 #endif
diff --git a/src/interfaces/ecpg/compatlib/exports.txt b/src/interfaces/ecpg/compatlib/exports.txt
index e0cfd7a22d..86e9ca1640 100644
--- a/src/interfaces/ecpg/compatlib/exports.txt
+++ b/src/interfaces/ecpg/compatlib/exports.txt
@@ -1,5 +1,5 @@
 # src/interfaces/ecpg/compatlib/exports.txt
-# Functions to be exported by ecpg_compatlib DLL
+# Functions to be exported by libecpg_compat DLL
 ECPG_informix_get_var   1
 ECPG_informix_set_var   2
 decadd                  3
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 3c0294e98a..4394b420a1 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1899,7 +1899,7 @@ ecpg_process_output(struct statement *stmt, bool clear_result)
 
 			/*
 			 * execution should never reach this code because it is already
-			 * handled in ECPGcheck_PQresult()
+			 * handled in ecpg_check_PQresult()
 			 */
 			ecpg_log("ecpg_process_output on line %d: unknown execution status type\n",
 					 stmt->lineno);
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index f1031d2595..e12d703b4e 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -63,8 +63,6 @@ char	   *ECPGprepared_statement(const char *, const char *, int);
 PGconn	   *ECPGget_PGconn(const char *);
 PGTransactionStatusType ECPGtransactionStatus(const char *);
 
-char	   *ECPGerrmsg(void);
-
  /* print an error message */
 void		sqlprint(void);
 
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 09690b6c76..3428a7c0fa 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -11036,7 +11036,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
       <entry><structfield>kinds</structfield></entry>
       <entry><type>text[]</type></entry>
       <entry></entry>
-      <entry>Types of exdended statistics enabled for this record</entry>
+      <entry>Types of extended statistics enabled for this record</entry>
      </row>
 
      <row>
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index fad859a812..645a1aad0a 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -367,8 +367,8 @@ static bool SetOffsetVacuumLimit(bool is_startup);
 static bool find_multixact_start(MultiXactId multi, MultiXactOffset *result);
 static void WriteMZeroPageXlogRec(int pageno, uint8 info);
 static void WriteMTruncateXlogRec(Oid oldestMultiDB,
-								  MultiXactId startOff, MultiXactId endOff,
-								  MultiXactOffset startMemb, MultiXactOffset endMemb);
+							MultiXactId startTruncOff, MultiXactId endTruncOff,
+							MultiXactOffset startTruncMemb, MultiXactOffset endTruncMemb);
 
 
 /*
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c
index a5cb7bba0f..5ee2a464bb 100644
--- a/src/backend/executor/execTuples.c
+++ b/src/backend/executor/execTuples.c
@@ -1148,7 +1148,7 @@ ExecAllocTableSlot(List **tupleTable, TupleDesc desc,
  *		This releases any resources (buffer pins, tupdesc refcounts)
  *		held by the tuple table, and optionally releases the memory
  *		occupied by the tuple table data structure.
- *		It is expected that this routine be called by EndPlan().
+ *		It is expected that this routine be called by ExecEndPlan().
  * --------------------------------
  */
 void
diff --git a/src/backend/executor/nodeProjectSet.c b/src/backend/executor/nodeProjectSet.c
index 277d278371..39b48cc680 100644
--- a/src/backend/executor/nodeProjectSet.c
+++ b/src/backend/executor/nodeProjectSet.c
@@ -196,7 +196,7 @@ ExecProjectSRF(ProjectSetState *node, bool continuing)
 	Assert(hassrf);
 
 	/*
-	 * If all the SRFs returned EndResult, we consider that as no row being
+	 * If all the SRFs returned ExprEndResult, we consider that as no row being
 	 * produced.
 	 */
 	if (hasresult)
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 2a44b434a5..7247c802d6 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -992,7 +992,7 @@ func_match_argtypes(int nargs,
  * the solution. In addition to requiring the operator operates on the
  * same type for both operands [as in the code Avi originally
  * commented out], we also require that the operators be equivalent in
- * some sense. (see equivalentOpersAfterPromotion for details.)
+ * some sense.
  * - ay 6/95
  */
 FuncCandidateList
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 2fedbc4c15..a4ac7077af 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -4360,7 +4360,7 @@ CheckTargetForConflictsIn(PREDICATELOCKTARGETTAG *targettag)
 	/*
 	 * If we found one of our own SIREAD locks to remove, remove it now.
 	 *
-	 * At this point our transaction already has an ExclusiveRowLock on the
+	 * At this point our transaction already has an RowExclusiveLock on the
 	 * relation, so we are OK to drop the predicate lock on the tuple, if
 	 * found, without fearing that another write against the tuple will occur
 	 * before the MVCC information makes it to the buffer.
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index dffb57bf11..858bcb6bc9 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -112,7 +112,7 @@ extern TableScanDesc heap_beginscan(Relation relation, Snapshot snapshot,
 									ParallelTableScanDesc parallel_scan,
 									uint32 flags);
 extern void heap_setscanlimits(TableScanDesc scan, BlockNumber startBlk,
-							   BlockNumber endBlk);
+							   BlockNumber numBlks);
 extern void heapgetpage(TableScanDesc scan, BlockNumber page);
 extern void heap_rescan(TableScanDesc scan, ScanKey key, bool set_params,
 						bool allow_strat, bool allow_sync, bool allow_pagemode);
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 99b9fa414f..98bdcbcef5 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -593,7 +593,7 @@ typedef struct EState
 	 * and with which options.  es_jit is created on-demand when JITing is
 	 * performed.
 	 *
-	 * es_jit_combined_instr is the combined, on demand allocated,
+	 * es_jit_worker_instr is the combined, on demand allocated,
 	 * instrumentation from all workers. The leader's instrumentation is kept
 	 * separate, and is combined on demand by ExplainPrintJITSummary().
 	 */
diff --git a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
index 6cb7ab1a19..de8241bfc8 100644
--- a/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -195,11 +195,8 @@ char	   *ecpg_strdup(const char *, int);
 const char *ecpg_type_name(enum ECPGttype);
 int			ecpg_dynamic_type(Oid);
 int			sqlda_dynamic_type(Oid, enum COMPAT_MODE);
-void		ecpg_free_auto_mem(void);
 void		ecpg_clear_auto_mem(void);
 
-struct descriptor *ecpggetdescp(int, char *);
-
 struct descriptor *ecpg_find_desc(int line, const char *name);
 
 struct prepared_statement *ecpg_find_prepared_statement(const char *,
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 2797af35c3..291412e305 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -1641,7 +1641,7 @@ expand_all_col_privileges(Oid table_oid, Form_pg_class classForm,
 
 /*
  *	This processes attributes, but expects to be called from
- *	ExecGrant_Relation, not directly from ExecGrantStmt.
+ *	ExecGrant_Relation, not directly from ExecuteGrantStmt.
  */
 static void
 ExecGrant_Attribute(InternalGrant *istmt, Oid relOid, const char *relname,
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index 67c4be5108..c0e4a5376c 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -98,8 +98,7 @@ ExecScanFetch(ScanState *node,
  *		ExecScan
  *
  *		Scans the relation using the 'access method' indicated and
- *		returns the next qualifying tuple in the direction specified
- *		in the global variable ExecDirection.
+ *		returns the next qualifying tuple.
  *		The access method returns the next tuple and ExecScan() is
  *		responsible for checking the tuple returned against the qual-clause.
  *
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 758b16dd35..99fd777149 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -28,7 +28,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecBitmapHeapScan			scans a relation using bitmap info
- *		ExecBitmapHeapNext			workhorse for above
+ *		BitmapHeapNext				workhorse for above
  *		ExecInitBitmapHeapScan		creates and initializes state info.
  *		ExecReScanBitmapHeapScan	prepares to rescan the plan.
  *		ExecEndBitmapHeapScan		releases all storage.
diff --git a/src/backend/executor/nodeRecursiveunion.c b/src/backend/executor/nodeRecursiveunion.c
index 9c5eed7def..81deb61c21 100644
--- a/src/backend/executor/nodeRecursiveunion.c
+++ b/src/backend/executor/nodeRecursiveunion.c
@@ -160,7 +160,7 @@ ExecRecursiveUnion(PlanState *pstate)
 }
 
 /* ----------------------------------------------------------------
- *		ExecInitRecursiveUnionScan
+ *		ExecInitRecursiveUnion
  * ----------------------------------------------------------------
  */
 RecursiveUnionState *
@@ -263,7 +263,7 @@ ExecInitRecursiveUnion(RecursiveUnion *node, EState *estate, int eflags)
 }
 
 /* ----------------------------------------------------------------
- *		ExecEndRecursiveUnionScan
+ *		ExecEndRecursiveUnion
  *
  *		frees any storage allocated through C routines.
  * ----------------------------------------------------------------
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c
index 436b43f8ca..debce4eb15 100644
--- a/src/backend/executor/nodeSeqscan.c
+++ b/src/backend/executor/nodeSeqscan.c
@@ -15,7 +15,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecSeqScan				sequentially scans a relation.
- *		ExecSeqNext				retrieve next tuple in sequential order.
+ *		SeqNext					retrieve next tuple in sequential order.
  *		ExecInitSeqScan			creates and initializes a seqscan node.
  *		ExecEndSeqScan			releases any storage allocated.
  *		ExecReScanSeqScan		rescans the relation
diff --git a/src/backend/executor/nodeSubqueryscan.c b/src/backend/executor/nodeSubqueryscan.c
index de8c006051..00c715d4e2 100644
--- a/src/backend/executor/nodeSubqueryscan.c
+++ b/src/backend/executor/nodeSubqueryscan.c
@@ -19,7 +19,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecSubqueryScan			scans a subquery.
- *		ExecSubqueryNext			retrieve next tuple in sequential order.
+ *		SubqueryNext				retrieve next tuple in sequential order.
  *		ExecInitSubqueryScan		creates and initializes a subqueryscan node.
  *		ExecEndSubqueryScan			releases any storage allocated.
  *		ExecReScanSubqueryScan		rescans the relation
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index d056fd6151..1fb28b4596 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -314,7 +314,7 @@ ExecEvalExprSwitchContext(ExprState *state,
  * ExecProject
  *
  * Projects a tuple based on projection info and stores it in the slot passed
- * to ExecBuildProjectInfo().
+ * to ExecBuildProjectionInfo().
  *
  * Note: the result is always a virtual tuple; therefore it may reference
  * the contents of the exprContext's scan tuples and/or temporary results
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 70f8b8e22b..f7a82f2234 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -94,10 +94,6 @@ typedef struct PlannedStmt
 	int			stmt_len;		/* length in bytes; 0 means "rest of string" */
 } PlannedStmt;
 
-/* macro for fetching the Plan associated with a SubPlan node */
-#define exec_subplan_get_plan(plannedstmt, subplan) \
-	((Plan *) list_nth((plannedstmt)->subplans, (subplan)->plan_id - 1))
-
 
 /* ----------------
  *		Plan node
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 08961e2af9..b8f98ce29b 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3294,7 +3294,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate,
 	 * reference; in particular, this path is always taken in functions with
 	 * one or more OUT parameters.
 	 *
-	 * Unlike exec_statement_return, there's no special win here for R/W
+	 * Unlike exec_stmt_return, there's no special win here for R/W
 	 * expanded values, since they'll have to get flattened to go into the
 	 * tuplestore.  Indeed, we'd better make them R/O to avoid any risk of the
 	 * casting step changing them in-place.
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 97b911679c..05c6ca81b9 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -504,9 +504,9 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation)
  * permission on the target namespace, this function will instead signal
  * an ERROR.
  *
- * If non-NULL, *existing_oid is set to the OID of any existing relation with
- * the same name which already exists in that namespace, or to InvalidOid if
- * no such relation exists.
+ * If non-NULL, *existing_relation_id is set to the OID of any existing relation
+ * with the same name which already exists in that namespace, or to InvalidOid
+ * if no such relation exists.
  *
  * If lockmode != NoLock, the specified lock mode is acquired on the existing
  * relation, if any, provided that the current user owns the target relation.
diff --git a/src/backend/executor/README b/src/backend/executor/README
index 05f197bc75..18b2ac1865 100644
--- a/src/backend/executor/README
+++ b/src/backend/executor/README
@@ -186,9 +186,9 @@ Expression Evaluation
 
 To allow for different methods of expression evaluation, and for
 better branch/jump target prediction, expressions are evaluated by
-calling ExprState->evalfunc (via ExprEvalExpr() and friends).
+calling ExprState->evalfunc (via ExecEvalExpr() and friends).
 
-ExprReadyExpr() can choose the method of interpretation by setting
+ExecReadyExpr() can choose the method of interpretation by setting
 evalfunc to an appropriate function.  The default execution function,
 ExecInterpExpr, is implemented in execExprInterp.c; see its header
 comment for details.  Special-case evalfuncs are used for certain
diff --git a/src/backend/executor/nodeValuesscan.c b/src/backend/executor/nodeValuesscan.c
index 0069a73588..a7bf4a7636 100644
--- a/src/backend/executor/nodeValuesscan.c
+++ b/src/backend/executor/nodeValuesscan.c
@@ -16,7 +16,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecValuesScan			scans a values list.
- *		ExecValuesNext			retrieve next tuple in sequential order.
+ *		ValuesNext			retrieve next tuple in sequential order.
  *		ExecInitValuesScan		creates and initializes a valuesscan node.
  *		ExecEndValuesScan		releases any storage allocated.
  *		ExecReScanValuesScan	rescans the values list
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 64acc3fa43..58c94e9257 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -1163,9 +1163,6 @@ _mdfd_getseg(SMgrRelation reln, ForkNumber forknum, BlockNumber blkno,
 			 * replaying WAL data that has a write into a high-numbered
 			 * segment of a relation that was later deleted. We want to go
 			 * ahead and create the segments so we can finish out the replay.
-			 * However if the caller has specified
-			 * EXTENSION_REALLY_RETURN_NULL, then extension is not desired
-			 * even in recovery; we won't reach this point in that case.
 			 *
 			 * We have to maintain the invariant that segments before the last
 			 * active segment are of size RELSEG_SIZE; therefore, if
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c
index 9d33c86a3b..401e0c8883 100644
--- a/src/bin/pg_dump/pg_backup_db.c
+++ b/src/bin/pg_dump/pg_backup_db.c
@@ -378,7 +378,7 @@ notice_processor(void *arg, const char *message)
 	pg_log_generic(PG_LOG_INFO, "%s", message);
 }
 
-/* Like exit_fatal(), but with a complaint about a particular query. */
+/* Like fatal(), but with a complaint about a particular query. */
 static void
 die_on_query_failure(ArchiveHandle *AH, const char *query)
 {
diff --git a/src/include/access/timeline.h b/src/include/access/timeline.h
index a6dc2edb89..e83a73a3f1 100644
--- a/src/include/access/timeline.h
+++ b/src/include/access/timeline.h
@@ -36,7 +36,7 @@ extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
 								 XLogRecPtr switchpoint, char *reason);
 extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
 extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
-extern bool tliInHistory(TimeLineID tli, List *expectedTLIs);
+extern bool tliInHistory(TimeLineID tli, List *expectedTLEs);
 extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
 extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
 								 TimeLineID *nextTLI);
diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h
index 81318c785a..b3e926865a 100644
--- a/src/include/partitioning/partprune.h
+++ b/src/include/partitioning/partprune.h
@@ -60,10 +60,10 @@ typedef struct PartitionPruneContext
 } PartitionPruneContext;
 
 /*
- * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[],
- * exprstates[] and exprhasexecparam[] arrays for step step_id and
- * partition key column keyno.  (Note: there is code that assumes the
- * entries for a given step are sequential, so this is not chosen freely.)
+ * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[]
+ * and exprstates[] arrays for step step_id and partition key column keyno.
+ * (Note: there is code that assumes the entries for a given step are
+ * sequential, so this is not chosen freely.)
  */
 #define PruneCxtStateIdx(partnatts, step_id, keyno) \
 	((partnatts) * (step_id) + (keyno))

Reply via email to