From c74d49d41c9e0fabeb1179dcabfb3137833ed831 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 1 Jul 2019 10:00:23 +0900 Subject: [PATCH] Fix many typos and inconsistencies Author: Alexander Lakhin Discussion: https://postgr.es/m/af27d1b3-a128-9d62-46e0-88f424397f44@gmail.com --- contrib/bloom/blutils.c | 2 +- contrib/intarray/_int_selfuncs.c | 2 +- contrib/pg_trgm/trgm_regexp.c | 6 +++--- contrib/pgcrypto/crypt-des.c | 2 +- contrib/postgres_fdw/expected/postgres_fdw.out | 2 +- contrib/postgres_fdw/sql/postgres_fdw.sql | 2 +- doc/src/sgml/diskusage.sgml | 6 +++--- src/backend/access/brin/brin_tuple.c | 4 ++-- src/backend/access/nbtree/nbtree.c | 4 ++-- src/backend/access/nbtree/nbtxlog.c | 2 +- src/backend/catalog/heap.c | 5 ++--- src/backend/executor/execExpr.c | 12 ++++++------ src/backend/libpq/be-fsstubs.c | 2 +- src/backend/nodes/tidbitmap.c | 2 +- src/backend/optimizer/path/equivclass.c | 9 ++++----- src/backend/optimizer/plan/createplan.c | 2 +- src/backend/optimizer/util/clauses.c | 8 ++++---- src/backend/parser/analyze.c | 2 +- src/backend/parser/gram.y | 2 +- src/backend/parser/parse_target.c | 6 +++--- src/backend/postmaster/bgworker.c | 2 +- src/backend/replication/logical/logical.c | 2 +- src/backend/replication/slot.c | 4 +++- src/backend/rewrite/rewriteHandler.c | 10 +++++----- src/backend/storage/buffer/freelist.c | 2 +- src/backend/storage/buffer/localbuf.c | 2 +- src/backend/storage/ipc/barrier.c | 6 +++--- src/backend/utils/Gen_dummy_probes.pl | 2 +- src/backend/utils/adt/arrayfuncs.c | 2 +- src/backend/utils/adt/date.c | 2 +- src/backend/utils/adt/datetime.c | 2 +- src/backend/utils/adt/oracle_compat.c | 2 +- src/backend/utils/cache/plancache.c | 2 +- src/backend/utils/mmgr/dsa.c | 2 +- src/backend/utils/mmgr/freepage.c | 2 +- src/include/access/attnum.h | 2 +- src/include/access/hash.h | 2 +- src/include/commands/event_trigger.h | 2 +- src/include/commands/extension.h | 2 -- src/include/executor/nodeCustom.h | 2 +- src/include/funcapi.h | 2 +- src/include/nodes/primnodes.h | 4 ++-- src/include/optimizer/cost.h | 2 -- src/include/optimizer/pathnode.h | 2 -- src/include/storage/fd.h | 2 +- src/include/storage/proc.h | 2 +- src/include/tcop/tcopprot.h | 5 ----- src/include/utils/inval.h | 2 -- src/include/utils/sortsupport.h | 4 ++-- src/interfaces/libpq/fe-auth.c | 4 ++-- 50 files changed, 76 insertions(+), 89 deletions(-) diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c index ee3bd56274..cc1670934f 100644 --- a/contrib/bloom/blutils.c +++ b/contrib/bloom/blutils.c @@ -341,7 +341,7 @@ BloomPageAddItem(BloomState *state, Page page, BloomTuple *tuple) /* * Allocate a new page (either by recycling, or by extending the index file) * The returned buffer is already pinned and exclusive-locked - * Caller is responsible for initializing the page by calling BloomInitBuffer + * Caller is responsible for initializing the page by calling BloomInitPage */ Buffer BloomNewBuffer(Relation index) diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c index b3e63df72c..aebffae66c 100644 --- a/contrib/intarray/_int_selfuncs.c +++ b/contrib/intarray/_int_selfuncs.c @@ -43,7 +43,7 @@ static int compare_val_int4(const void *a, const void *b); * * The default array selectivity operators for the @>, && and @< operators * work fine for integer arrays. However, if we tried to just use arraycontsel - * and arracontjoinsel directly as the cost estimator functions for our + * and arraycontjoinsel directly as the cost estimator functions for our * operators, they would not work as intended, because they look at the * operator's OID. Our operators behave exactly like the built-in anyarray * versions, but we must tell the cost estimator functions which built-in diff --git a/contrib/pg_trgm/trgm_regexp.c b/contrib/pg_trgm/trgm_regexp.c index 9ee8a54a8d..c239d8cea6 100644 --- a/contrib/pg_trgm/trgm_regexp.c +++ b/contrib/pg_trgm/trgm_regexp.c @@ -441,9 +441,9 @@ typedef struct struct TrgmPackedGraph { /* - * colorTrigramsCount and colorTrigramsGroups contain information about - * how trigrams are grouped into color trigrams. "colorTrigramsCount" is - * the count of color trigrams and "colorTrigramGroups" contains number of + * colorTrigramsCount and colorTrigramGroups contain information about how + * trigrams are grouped into color trigrams. "colorTrigramsCount" is the + * count of color trigrams and "colorTrigramGroups" contains number of * simple trigrams for each color trigram. The array of simple trigrams * (stored separately from this struct) is ordered so that the simple * trigrams for each color trigram are consecutive, and they're in order diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c index ed07fc4606..6efaa609c9 100644 --- a/contrib/pgcrypto/crypt-des.c +++ b/contrib/pgcrypto/crypt-des.c @@ -11,7 +11,7 @@ * binaries of libcrypt exportable from the USA * * Adapted for FreeBSD-4.0 by Mark R V Murray - * this file should now *only* export crypt_des(), in order to make + * this file should now *only* export px_crypt_des(), in order to make * a module that can be optionally included in libcrypt. * * Redistribution and use in source and binary forms, with or without diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index b2050d1b6f..f0c842a607 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -665,7 +665,7 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (("C 1" = ANY (ARRAY[c2, 1, ("C 1" + 0)]))) (3 rows) -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- ArrayRef +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Foreign Scan on public.ft1 t1 diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 2a8e6c7b28..630b803e26 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -297,7 +297,7 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1; -- Op EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!; -- OpExpr(r) EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- ArrayRef +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c6 = E'foo''s\\bar'; -- check special chars EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c8 = 'foo'; -- can't be sent to remote -- parameterized remote path for foreign table diff --git a/doc/src/sgml/diskusage.sgml b/doc/src/sgml/diskusage.sgml index 3708e5f3d8..75467582e4 100644 --- a/doc/src/sgml/diskusage.sgml +++ b/doc/src/sgml/diskusage.sgml @@ -87,9 +87,9 @@ WHERE c.relname = 'customer' AND c2.oid = i.indexrelid ORDER BY c2.relname; - relname | relpages -----------------------+---------- - customer_id_indexdex | 26 + relname | relpages +-------------------+---------- + customer_id_index | 26 diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index 5abb472ee4..2b3861710c 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -1,5 +1,5 @@ /* - * brin_tuples.c + * brin_tuple.c * Method implementations for tuples in BRIN indexes. * * Intended usage is that code outside this file only deals with @@ -207,7 +207,7 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, /* * Note that we reverse the sense of null bits in this module: we * store a 1 for a null attribute rather than a 0. So we must reverse - * the sense of the att_isnull test in br_deconstruct_tuple as well. + * the sense of the att_isnull test in brin_deconstruct_tuple as well. */ bitP = ((bits8 *) ((char *) rettuple + SizeOfBrinTuple)) - 1; bitmask = HIGHBIT; diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c index 85e54ac44b..4cfd5289ad 100644 --- a/src/backend/access/nbtree/nbtree.c +++ b/src/backend/access/nbtree/nbtree.c @@ -621,8 +621,8 @@ btparallelrescan(IndexScanDesc scan) /* * _bt_parallel_seize() -- Begin the process of advancing the scan to a new - * page. Other scans must wait until we call bt_parallel_release() or - * bt_parallel_done(). + * page. Other scans must wait until we call _bt_parallel_release() + * or _bt_parallel_done(). * * The return value is true if we successfully seized the scan and false * if we did not. The latter case occurs if no pages remain for the current diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c index 6532a25d3d..3147ea4726 100644 --- a/src/backend/access/nbtree/nbtxlog.c +++ b/src/backend/access/nbtree/nbtxlog.c @@ -181,7 +181,7 @@ btree_xlog_insert(bool isleaf, bool ismeta, XLogReaderState *record) if (PageAddItem(page, (Item) datapos, datalen, xlrec->offnum, false, false) == InvalidOffsetNumber) - elog(PANIC, "btree_insert_redo: failed to add item"); + elog(PANIC, "btree_xlog_insert: failed to add item"); PageSetLSN(page, lsn); MarkBufferDirty(buffer); diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 86820eecfc..3b8c8b193a 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -1588,9 +1588,8 @@ RemoveAttributeById(Oid relid, AttrNumber attnum) /* * Grab an exclusive lock on the target table, which we will NOT release * until end of transaction. (In the simple case where we are directly - * dropping this column, AlterTableDropColumn already did this ... but - * when cascading from a drop of some other object, we may not have any - * lock.) + * dropping this column, ATExecDropColumn already did this ... but when + * cascading from a drop of some other object, we may not have any lock.) */ rel = relation_open(relid, AccessExclusiveLock); diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index e4a6c20ed0..e4e05753ee 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -1200,12 +1200,12 @@ ExecInitExprRec(Expr *node, ExprState *state, * field's values[]/nulls[] entries as both the caseval * source and the result address for this subexpression. * That's okay only because (1) both FieldStore and - * ArrayRef evaluate their arg or refexpr inputs first, - * and (2) any such CaseTestExpr is directly the arg or - * refexpr input. So any read of the caseval will occur - * before there's a chance to overwrite it. Also, if - * multiple entries in the newvals/fieldnums lists target - * the same field, they'll effectively be applied + * SubscriptingRef evaluate their arg or refexpr inputs + * first, and (2) any such CaseTestExpr is directly the + * arg or refexpr input. So any read of the caseval will + * occur before there's a chance to overwrite it. Also, + * if multiple entries in the newvals/fieldnums lists + * target the same field, they'll effectively be applied * left-to-right which is what we want. */ save_innermost_caseval = state->innermost_caseval; diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index 68f83a9bfd..97add3f257 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -62,7 +62,7 @@ * A non-null entry is a pointer to a LargeObjectDesc allocated in the * LO private memory context "fscxt". The cookies array itself is also * dynamically allocated in that context. Its current allocated size is - * cookies_len entries, of which any unused entries will be NULL. + * cookies_size entries, of which any unused entries will be NULL. */ static LargeObjectDesc **cookies = NULL; static int cookies_size = 0; diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index 9b913feb89..bf53459996 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -934,7 +934,7 @@ tbm_extract_page_tuple(PagetableEntry *page, TBMIterateResult *output) } /* - * tbm_advance_schunkbit - Advance the chunkbit + * tbm_advance_schunkbit - Advance the schunkbit */ static inline void tbm_advance_schunkbit(PagetableEntry *chunk, int *schunkbitp) diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index b50e9ccdf1..688d9b0707 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -929,11 +929,10 @@ generate_base_implied_equalities_no_const(PlannerInfo *root, /* * We scan the EC members once and track the last-seen member for each * base relation. When we see another member of the same base relation, - * we generate "prev_mem = cur_mem". This results in the minimum number - * of derived clauses, but it's possible that it will fail when a - * different ordering would succeed. XXX FIXME: use a UNION-FIND - * algorithm similar to the way we build merged ECs. (Use a list-of-lists - * for each rel.) + * we generate "prev_em = cur_em". This results in the minimum number of + * derived clauses, but it's possible that it will fail when a different + * ordering would succeed. XXX FIXME: use a UNION-FIND algorithm similar + * to the way we build merged ECs. (Use a list-of-lists for each rel.) */ prev_ems = (EquivalenceMember **) palloc0(root->simple_rel_array_size * sizeof(EquivalenceMember *)); diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 608d5adfed..12fba56285 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -3911,7 +3911,7 @@ create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path, } /* - * create_custom_plan + * create_customscan_plan * * Transform a CustomPath into a Plan. */ diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 2e84d6b3b4..d78f4e64c1 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -3409,10 +3409,10 @@ eval_const_expressions_mutator(Node *node, { /* * This case could be folded into the generic handling used - * for ArrayRef etc. But because the simplification logic is - * so trivial, applying evaluate_expr() to perform it would be - * a heavy overhead. BooleanTest is probably common enough to - * justify keeping this bespoke implementation. + * for SubscriptingRef etc. But because the simplification + * logic is so trivial, applying evaluate_expr() to perform it + * would be a heavy overhead. BooleanTest is probably common + * enough to justify keeping this bespoke implementation. */ BooleanTest *btest = (BooleanTest *) node; BooleanTest *newbtest; diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index b13c246183..345a8e6197 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -2082,7 +2082,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt, * Select common collation. A common collation is required for * all set operators except UNION ALL; see SQL:2008 7.13 Syntax Rule 15c. (If we fail to identify a common - * collation for a UNION ALL column, the curCollations element + * collation for a UNION ALL column, the colCollations element * will be set to InvalidOid, which may result in a runtime error * if something at a higher query level wants to use the column's * collation.) diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 8311b1dd46..208b4a1f28 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -12542,7 +12542,7 @@ SimpleTypename: * Note that ConstInterval is not included here since it must * be pushed up higher in the rules to accommodate the postfix * options (e.g. INTERVAL '1' YEAR). Likewise, we have to handle - * the generic-type-name case in AExprConst to avoid premature + * the generic-type-name case in AexprConst to avoid premature * reduce/reduce conflicts against function names. */ ConstTypename: diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index ba470366e1..b70d92b955 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -695,9 +695,9 @@ transformAssignmentIndirection(ParseState *pstate, /* * Set up a substitution. We abuse CaseTestExpr for this. It's safe * to do so because the only nodes that will be above the CaseTestExpr - * in the finished expression will be FieldStore and ArrayRef nodes. - * (There could be other stuff in the tree, but it will be within - * other child fields of those node types.) + * in the finished expression will be FieldStore and SubscriptingRef + * nodes. (There could be other stuff in the tree, but it will be + * within other child fields of those node types.) */ CaseTestExpr *ctest = makeNode(CaseTestExpr); diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index f5db5a8c4a..b66b517aca 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -525,7 +525,7 @@ ResetBackgroundWorkerCrashTimes(void) if (rw->rw_worker.bgw_restart_time == BGW_NEVER_RESTART) { /* - * Workers marked BGW_NVER_RESTART shouldn't get relaunched after + * Workers marked BGW_NEVER_RESTART shouldn't get relaunched after * the crash, so forget about them. (If we wait until after the * crash to forget about them, and they are parallel workers, * parallel_terminate_count will get incremented after we've diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index bbd38c06d1..9853be6d1c 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -114,7 +114,7 @@ CheckLogicalDecodingRequirements(void) } /* - * Helper function for CreateInitialDecodingContext() and + * Helper function for CreateInitDecodingContext() and * CreateDecodingContext() performing common tasks. */ static LogicalDecodingContext * diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 55c306e465..3861b8f583 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -1334,7 +1334,9 @@ SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel) return; } - /* Check CreateSlot() for the reasoning of using a crit. section. */ + /* + * Check CreateSlotOnDisk() for the reasoning of using a critical section. + */ START_CRIT_SECTION(); fsync_fname(path, false); diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index ea40c28733..5b047d1662 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -980,11 +980,11 @@ process_matched_tle(TargetEntry *src_tle, * * As a further complication, the destination column might be a domain, * resulting in each assignment containing a CoerceToDomain node over a - * FieldStore or ArrayRef. These should have matching target domains, - * so we strip them and reconstitute a single CoerceToDomain over the - * combined FieldStore/ArrayRef nodes. (Notice that this has the result - * that the domain's checks are applied only after we do all the field or - * element updates, not after each one. This is arguably desirable.) + * FieldStore or SubscriptingRef. These should have matching target + * domains, so we strip them and reconstitute a single CoerceToDomain over + * the combined FieldStore/SubscriptingRef nodes. (Notice that this has the + * result that the domain's checks are applied only after we do all the + * field or element updates, not after each one. This is arguably desirable.) *---------- */ src_expr = (Node *) src_tle->expr; diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c index 06659ab265..c8d4e6f9e4 100644 --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freelist.c @@ -220,7 +220,7 @@ StrategyGetBuffer(BufferAccessStrategy strategy, uint32 *buf_state) * If asked, we need to waken the bgwriter. Since we don't want to rely on * a spinlock for this we force a read from shared memory once, and then * set the latch based on that value. We need to go through that length - * because otherwise bgprocno might be reset while/after we check because + * because otherwise bgwprocno might be reset while/after we check because * the compiler might just reread from memory. * * This can possibly set the latch of the wrong process if the bgwriter diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index c462ea82a9..391b6d6e16 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -537,7 +537,7 @@ GetLocalBufferStorage(void) /* * CheckForLocalBufferLeaks - ensure this backend holds no local buffer pins * - * This is just like CheckBufferLeaks(), but for local buffers. + * This is just like CheckForBufferLeaks(), but for local buffers. */ static void CheckForLocalBufferLeaks(void) diff --git a/src/backend/storage/ipc/barrier.c b/src/backend/storage/ipc/barrier.c index 69ed034e52..83cbe33107 100644 --- a/src/backend/storage/ipc/barrier.c +++ b/src/backend/storage/ipc/barrier.c @@ -226,9 +226,9 @@ BarrierAttach(Barrier *barrier) } /* - * Detach from a barrier. This may release other waiters from BarrierWait and - * advance the phase if they were only waiting for this backend. Return true - * if this participant was the last to detach. + * Detach from a barrier. This may release other waiters from + * BarrierArriveAndWait() and advance the phase if they were only waiting for + * this backend. Return true if this participant was the last to detach. */ bool BarrierDetach(Barrier *barrier) diff --git a/src/backend/utils/Gen_dummy_probes.pl b/src/backend/utils/Gen_dummy_probes.pl index a662775cc1..a4b58ad69f 100644 --- a/src/backend/utils/Gen_dummy_probes.pl +++ b/src/backend/utils/Gen_dummy_probes.pl @@ -14,7 +14,7 @@ # #------------------------------------------------------------------------- -# turn off perlcritic for autogened code +# turn off perlcritic for autogenerated code ## no critic $0 =~ s/^.*?(\w+)[\.\w+]*$/$1/; diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index f9f621e759..8fcdf82922 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -1322,7 +1322,7 @@ array_recv(PG_FUNCTION_ARGS) lBound[i] = pq_getmsgint(buf, 4); /* - * Check overflow of upper bound. (ArrayNItems() below checks that + * Check overflow of upper bound. (ArrayGetNItems() below checks that * dim[i] >= 0) */ if (dim[i] != 0) diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index e440a4fedd..4b1afb10f9 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -1374,7 +1374,7 @@ time_scale(PG_FUNCTION_ARGS) /* AdjustTimeForTypmod() * Force the precision of the time value to a specified value. - * Uses *exactly* the same code as in AdjustTimestampForTypemod() + * Uses *exactly* the same code as in AdjustTimestampForTypmod() * but we make a separate copy because those types do not * have a fundamental tie together but rather a coincidence of * implementation. - thomas diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index e9add385ba..54ea69f7f1 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -3029,7 +3029,7 @@ DecodeSpecial(int field, char *lowtoken, int *val) } -/* ClearPgTM +/* ClearPgTm * * Zero out a pg_tm and associated fsec_t */ diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index f78f5cda53..0fdfee5825 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -527,7 +527,7 @@ dotrim(const char *string, int stringlen, * * Syntax: * - * bytea byteatrim(byta string, bytea set) + * bytea byteatrim(bytea string, bytea set) * * Purpose: * diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index 4c114439cf..abc3062892 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -504,7 +504,7 @@ DropCachedPlan(CachedPlanSource *plansource) plansource->is_saved = false; } - /* Decrement generic CachePlan's refcount and drop if no longer needed */ + /* Decrement generic CachedPlan's refcount and drop if no longer needed */ ReleaseGenericPlan(plansource); /* Mark it no longer valid */ diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c index 4b826cdaa5..900cd8357c 100644 --- a/src/backend/utils/mmgr/dsa.c +++ b/src/backend/utils/mmgr/dsa.c @@ -2258,7 +2258,7 @@ check_for_freed_segments(dsa_area *area) } /* - * Workhorse for check_for_free_segments(), and also used directly in path + * Workhorse for check_for_freed_segments(), and also used directly in path * where the area lock is already held. This should be called after acquiring * the lock but before looking up any segment by index number, to make sure we * unmap any stale segments that might have previously had the same index as a diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c index 0c9e98973a..9a1ae13ab1 100644 --- a/src/backend/utils/mmgr/freepage.c +++ b/src/backend/utils/mmgr/freepage.c @@ -231,7 +231,7 @@ FreePageManagerGet(FreePageManager *fpm, Size npages, Size *first_page) /* * FreePageManagerGetInternal may have set contiguous_pages_dirty. - * Recompute contigous_pages if so. + * Recompute contiguous_pages if so. */ FreePageManagerUpdateLargest(fpm); diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h index f16441a587..093eee86c6 100644 --- a/src/include/access/attnum.h +++ b/src/include/access/attnum.h @@ -55,7 +55,7 @@ typedef int16 AttrNumber; ) /* - * AttributeOffsetGetAttributeNumber + * AttrOffsetGetAttrNumber * Returns the attribute number for an attribute offset. */ #define AttrOffsetGetAttrNumber(attributeOffset) \ diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 210351863e..107c3d01ae 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -457,7 +457,7 @@ extern void hashbucketcleanup(Relation rel, Bucket cur_bucket, BufferAccessStrategy bstrategy, uint32 maxbucket, uint32 highmask, uint32 lowmask, double *tuples_removed, double *num_index_tuples, - bool bucket_has_garbage, + bool split_cleanup, IndexBulkDeleteCallback callback, void *callback_state); #endif /* HASH_H */ diff --git a/src/include/commands/event_trigger.h b/src/include/commands/event_trigger.h index fd977e7735..575e9243e5 100644 --- a/src/include/commands/event_trigger.h +++ b/src/include/commands/event_trigger.h @@ -40,7 +40,7 @@ typedef struct EventTriggerData ((fcinfo)->context != NULL && IsA((fcinfo)->context, EventTriggerData)) extern Oid CreateEventTrigger(CreateEventTrigStmt *stmt); -extern void RemoveEventTriggerById(Oid ctrigOid); +extern void RemoveEventTriggerById(Oid trigOid); extern Oid get_event_trigger_oid(const char *trigname, bool missing_ok); extern Oid AlterEventTrigger(AlterEventTrigStmt *stmt); diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h index 923f8530b4..c724430aec 100644 --- a/src/include/commands/extension.h +++ b/src/include/commands/extension.h @@ -51,6 +51,4 @@ extern char *get_extension_name(Oid ext_oid); extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema); -extern void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId); - #endif /* EXTENSION_H */ diff --git a/src/include/executor/nodeCustom.h b/src/include/executor/nodeCustom.h index 2c9cb95d82..2829be5d01 100644 --- a/src/include/executor/nodeCustom.h +++ b/src/include/executor/nodeCustom.h @@ -18,7 +18,7 @@ /* * General executor code */ -extern CustomScanState *ExecInitCustomScan(CustomScan *custom_scan, +extern CustomScanState *ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags); extern void ExecEndCustomScan(CustomScanState *node); diff --git a/src/include/funcapi.h b/src/include/funcapi.h index ebba8b6f54..1a88b52087 100644 --- a/src/include/funcapi.h +++ b/src/include/funcapi.h @@ -252,7 +252,7 @@ extern Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple); * oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); * * - * + * * * * // return to original context when allocating transient memory diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index 7c278c0e56..860a84de7c 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -940,7 +940,7 @@ typedef struct CaseWhen * We also abuse this node type for some other purposes, including: * * Placeholder for the current array element value in ArrayCoerceExpr; * see build_coercion_expression(). - * * Nested FieldStore/ArrayRef assignment expressions in INSERT/UPDATE; + * * Nested FieldStore/SubscriptingRef assignment expressions in INSERT/UPDATE; * see transformAssignmentIndirection(). * * The uses in CaseExpr and ArrayCoerceExpr are safe only to the extent that @@ -950,7 +950,7 @@ typedef struct CaseWhen * break it. * * The nested-assignment-expression case is safe because the only node types - * that can be above such CaseTestExprs are FieldStore and ArrayRef. + * that can be above such CaseTestExprs are FieldStore and SubscriptingRef. */ typedef struct CaseTestExpr { diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h index 9b6bdbc518..b3d0b4f6fb 100644 --- a/src/include/optimizer/cost.h +++ b/src/include/optimizer/cost.h @@ -86,8 +86,6 @@ extern void cost_subqueryscan(SubqueryScanPath *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info); extern void cost_functionscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info); -extern void cost_tableexprscan(Path *path, PlannerInfo *root, - RelOptInfo *baserel, ParamPathInfo *param_info); extern void cost_valuesscan(Path *path, PlannerInfo *root, RelOptInfo *baserel, ParamPathInfo *param_info); extern void cost_tablefuncscan(Path *path, PlannerInfo *root, diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h index e70d6a3f18..182ffeef4b 100644 --- a/src/include/optimizer/pathnode.h +++ b/src/include/optimizer/pathnode.h @@ -96,8 +96,6 @@ extern SubqueryScanPath *create_subqueryscan_path(PlannerInfo *root, List *pathkeys, Relids required_outer); extern Path *create_functionscan_path(PlannerInfo *root, RelOptInfo *rel, List *pathkeys, Relids required_outer); -extern Path *create_tablexprscan_path(PlannerInfo *root, RelOptInfo *rel, - List *pathkeys, Relids required_outer); extern Path *create_valuesscan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern Path *create_tablefuncscan_path(PlannerInfo *root, RelOptInfo *rel, diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 9959258d7d..d2a8c52044 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -33,7 +33,7 @@ * no way for them to share kernel file descriptors with other files. * * Likewise, use AllocateDir/FreeDir, not opendir/closedir, to allocate - * open directories (DIR*), and OpenTransientFile/CloseTransient File for an + * open directories (DIR*), and OpenTransientFile/CloseTransientFile for an * unbuffered file descriptor. */ #ifndef FD_H diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 1cee7db89d..ac7ee72952 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -63,7 +63,7 @@ struct XidCache (PROC_IN_VACUUM | PROC_IN_ANALYZE | PROC_VACUUM_FOR_WRAPAROUND) /* - * We allow a small number of "weak" relation locks (AccesShareLock, + * We allow a small number of "weak" relation locks (AccessShareLock, * RowShareLock, RowExclusiveLock) to be recorded in the PGPROC structure * rather than the main lock table. This eases contention on the lock * manager LWLocks. See storage/lmgr/README for additional details. diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index 8dcfb40728..ec21f7e45c 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -9,11 +9,6 @@ * * src/include/tcop/tcopprot.h * - * OLD COMMENTS - * This file was created so that other c files could get the two - * function prototypes without having to include tcop.h which single - * handedly includes the whole f*cking tree -- mer 5 Nov. 1991 - * *------------------------------------------------------------------------- */ #ifndef TCOPPROT_H diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index e7baa39d2a..940d53f900 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -29,8 +29,6 @@ extern void AtEOXact_Inval(bool isCommit); extern void AtEOSubXact_Inval(bool isCommit); -extern void AtPrepare_Inval(void); - extern void PostPrepare_Inval(void); extern void CommandEndInvalidationMessages(void); diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h index 1eb89da3f7..997b7900a7 100644 --- a/src/include/utils/sortsupport.h +++ b/src/include/utils/sortsupport.h @@ -184,8 +184,8 @@ typedef struct SortSupportData /* * Full, authoritative comparator for key that an abbreviated * representation was generated for, used when an abbreviated comparison - * was inconclusive (by calling ApplySortComparatorFull()), or used to - * replace "comparator" when core system ultimately decides against + * was inconclusive (by calling ApplySortAbbrevFullComparator()), or used + * to replace "comparator" when core system ultimately decides against * abbreviation. */ int (*abbrev_full_comparator) (Datum x, Datum y, SortSupport ssup); diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index bb04e27e2f..ab227421b3 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -717,7 +717,7 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq) const char *pwd_to_send; char md5Salt[4]; - /* Read the salt from the AuthenticationMD5 message. */ + /* Read the salt from the AuthenticationMD5Password message. */ if (areq == AUTH_REQ_MD5) { if (pqGetnchar(md5Salt, 4, conn)) @@ -897,7 +897,7 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) /* * No SSPI support. However, if we have GSSAPI but not SSPI * support, AUTH_REQ_SSPI will have been handled in the codepath - * for AUTH_REQ_GSSAPI above, so don't duplicate the case label in + * for AUTH_REQ_GSS above, so don't duplicate the case label in * that case. */ #if !defined(ENABLE_GSS)