On Tue, Oct 29, 2019 at 9:19 AM Dilip Kumar <dilipbal...@gmail.com> wrote: > > Few comments: > 1. > * The act of allocating pages to recycle may have invalidated the > - * results of our previous btree reserch, so repeat it. (We could > + * results of our previous btree search, so repeat it. (We could > * recheck whether any of our split-avoidance strategies that were > Fixed > I think the old comment meant "btree research" but you changed to "btree > search" > > 2. > /* copy&pasted from .../src/backend/utils/adt/datetime.c > - * and changesd struct pg_tm to struct tm > + * and changes struct pg_tm to struct tm > */ > Seems like this comment meant "Changed struct pg_tm to struct tm" Fixed Thanks for the review. I have attached the updated patch with the fixes.
Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com
From dd0ef8c36011095508937f31890690608697d30d Mon Sep 17 00:00:00 2001 From: vignesh <vignesh@localhost.localdomain> Date: Tue, 29 Oct 2019 17:16:57 +0530 Subject: [PATCH] Fixed typos in the code. Fixed typos across the code. --- contrib/pg_trgm/trgm_op.c | 4 ++-- contrib/pgcrypto/imath.c | 4 ++-- contrib/pgcrypto/pgp-info.c | 2 +- contrib/sepgsql/database.c | 2 +- contrib/sepgsql/dml.c | 2 +- contrib/sepgsql/schema.c | 2 +- src/backend/access/common/detoast.c | 2 +- src/backend/access/nbtree/nbtsplitloc.c | 2 +- src/backend/replication/walreceiver.c | 2 +- src/backend/statistics/mcv.c | 2 +- src/backend/storage/buffer/bufmgr.c | 4 +++- src/backend/storage/lmgr/proc.c | 2 +- src/backend/storage/lmgr/s_lock.c | 2 +- src/backend/utils/adt/jsonfuncs.c | 2 +- src/backend/utils/adt/rangetypes_gist.c | 6 +++--- src/backend/utils/mmgr/freepage.c | 2 +- src/bin/pg_upgrade/parallel.c | 2 +- src/bin/psql/tab-complete.c | 2 +- src/interfaces/ecpg/compatlib/informix.c | 2 +- src/interfaces/ecpg/pgtypeslib/interval.c | 10 +++++----- 20 files changed, 30 insertions(+), 28 deletions(-) diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c index 4679efe..07a3180 100644 --- a/contrib/pg_trgm/trgm_op.c +++ b/contrib/pg_trgm/trgm_op.c @@ -467,7 +467,7 @@ comp_ptrgm(const void *v1, const void *v2) * ulen1: count of unique trigrams of array "trg1". * len2: length of array "trg2" and array "trg2indexes". * len: length of the array "found". - * lags: set of boolean flags parametrizing similarity calculation. + * lags: set of boolean flags parameterizing similarity calculation. * bounds: whether each trigram is left/right bound of word. * * Returns word similarity. @@ -632,7 +632,7 @@ iterate_word_similarity(int *trg2indexes, * * str1: search pattern string, of length slen1 bytes. * str2: text in which we are looking for a word, of length slen2 bytes. - * flags: set of boolean flags parametrizing similarity calculation. + * flags: set of boolean flags parameterizing similarity calculation. * * Returns word similarity. */ diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index 545f148..ac250c7 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -3366,14 +3366,14 @@ s_udiv_knuth(mp_int u, mp_int v) * D4,D5,D6: Multiply qhat * v and test for a correct value of q * * We proceed a bit different than the way described by Knuth. This - * way is simpler but less efficent. Instead of doing the multiply and + * way is simpler but less efficient. Instead of doing the multiply and * subtract then checking for underflow, we first do the multiply of * qhat * v and see if it is larger than the current remainder r. If * it is larger, we decrease qhat by one and try again. We may need to * decrease qhat one more time before we get a value that is smaller * than r. * - * This way is less efficent than Knuth becuase we do more multiplies, + * This way is less efficient than Knuth because we do more multiplies, * but we do not need to worry about underflow this way. */ /* t = qhat * v */ diff --git a/contrib/pgcrypto/pgp-info.c b/contrib/pgcrypto/pgp-info.c index b2300ea..83dc604 100644 --- a/contrib/pgcrypto/pgp-info.c +++ b/contrib/pgcrypto/pgp-info.c @@ -169,7 +169,7 @@ pgp_get_keyid(MBuf *pgp_data, char *dst) break; case PGP_PKT_SYMENCRYPTED_SESSKEY: got_symenc_key++; - /* fallthru */ + /* fall through */ case PGP_PKT_SIGNATURE: case PGP_PKT_MARKER: case PGP_PKT_TRUST: diff --git a/contrib/sepgsql/database.c b/contrib/sepgsql/database.c index 0190d38..5850e07 100644 --- a/contrib/sepgsql/database.c +++ b/contrib/sepgsql/database.c @@ -74,7 +74,7 @@ sepgsql_database_post_create(Oid databaseId, const char *dtemplate) * Compute a default security label of the newly created database based on * a pair of security label of client and source database. * - * XXX - uncoming version of libselinux supports to take object name to + * XXX - upcoming version of libselinux supports to take object name to * handle special treatment on default security label. */ rel = table_open(DatabaseRelationId, AccessShareLock); diff --git a/contrib/sepgsql/dml.c b/contrib/sepgsql/dml.c index 1419879..5ff04db 100644 --- a/contrib/sepgsql/dml.c +++ b/contrib/sepgsql/dml.c @@ -85,7 +85,7 @@ fixup_whole_row_references(Oid relOid, Bitmapset *columns) * When user is querying on a table with children, it implicitly accesses * child tables also. So, we also need to check security label of child * tables and columns, but here is no guarantee attribute numbers are - * same between the parent ans children. + * same between the parent and children. * It returns a bitmapset which contains attribute number of the child * table based on the given bitmapset of the parent. */ diff --git a/contrib/sepgsql/schema.c b/contrib/sepgsql/schema.c index 92ef156..00c227d 100644 --- a/contrib/sepgsql/schema.c +++ b/contrib/sepgsql/schema.c @@ -51,7 +51,7 @@ sepgsql_schema_post_create(Oid namespaceId) * Compute a default security label when we create a new schema object * under the working database. * - * XXX - uncoming version of libselinux supports to take object name to + * XXX - upcoming version of libselinux supports to take object name to * handle special treatment on default security label; such as special * label on "pg_temp" schema. */ diff --git a/src/backend/access/common/detoast.c b/src/backend/access/common/detoast.c index b25ca68..00f0ff5 100644 --- a/src/backend/access/common/detoast.c +++ b/src/backend/access/common/detoast.c @@ -501,7 +501,7 @@ toast_fetch_datum(struct varlena *attr) * in the toast relation * * Note that this function supports non-compressed external datums - * and compressed external datums (in which case the requrested slice + * and compressed external datums (in which case the requested slice * has to be a prefix, i.e. sliceoffset has to be 0). * ---------- */ diff --git a/src/backend/access/nbtree/nbtsplitloc.c b/src/backend/access/nbtree/nbtsplitloc.c index 1c1029b..a04d4e2 100644 --- a/src/backend/access/nbtree/nbtsplitloc.c +++ b/src/backend/access/nbtree/nbtsplitloc.c @@ -814,7 +814,7 @@ _bt_bestsplitloc(FindSplitData *state, int perfectpenalty, final->firstoldonright < state->newitemoff + MAX_LEAF_INTERVAL) { /* - * Avoid the problem by peforming a 50:50 split when the new item is + * Avoid the problem by performing a 50:50 split when the new item is * just to the right of the would-be "many duplicates" split point. */ final = &state->splits[0]; diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index 6abc780..f54ae76 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -1052,7 +1052,7 @@ XLogWalRcvFlush(bool dying) * false, this is a no-op. * * If 'requestReply' is true, requests the server to reply immediately upon - * receiving this message. This is used for heartbearts, when approaching + * receiving this message. This is used for heartbeats, when approaching * wal_receiver_timeout. */ static void diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c index ee35f6a..ae0ddac 100644 --- a/src/backend/statistics/mcv.c +++ b/src/backend/statistics/mcv.c @@ -476,7 +476,7 @@ sort_item_compare(const void *a, const void *b, void *arg) * build_column_frequencies * compute frequencies of values in each column * - * This returns an array of SortItems for each attibute the MCV is built + * This returns an array of SortItems for each attribute the MCV is built * on, with a frequency (number of occurrences) for each value. This is * then used to compute "base" frequency of MCV items. * diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 483f705..580f4fe 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -1208,7 +1208,9 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, LWLockAcquire(newPartitionLock, LW_EXCLUSIVE); /* remember we have no old-partition lock or tag */ oldPartitionLock = NULL; - /* this just keeps the compiler quiet about uninit variables */ + /* + * this just keeps the compiler quiet about uninitialized variables + */ oldHash = 0; } diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 498373f..b3c54a6 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -636,7 +636,7 @@ PublishStartupProcessInformation(void) } /* - * Used from bufgr to share the value of the buffer that Startup waits on, + * Used from bufmgr to share the value of the buffer that Startup waits on, * or to reset the value to "not waiting" (-1). This allows processing * of recovery conflicts for buffer pins. Set is made before backends look * at this value, so locking not required, especially since the set is diff --git a/src/backend/storage/lmgr/s_lock.c b/src/backend/storage/lmgr/s_lock.c index 2e6c55b..13e4888 100644 --- a/src/backend/storage/lmgr/s_lock.c +++ b/src/backend/storage/lmgr/s_lock.c @@ -25,7 +25,7 @@ * increase the delay, else the spinlock holder may never get to run and * release the lock. (Consider situation where spinlock holder has been * nice'd down in priority by the scheduler --- it will not get scheduled - * until all would-be acquirers are sleeping, so if we always use a 1-msec + * until all would-be acquirers are sleeping, so if we always use a 1 msec * sleep, there is a real possibility of starvation.) But we can't just * clamp the delay to an upper bound, else it would take a long time to * make a reasonable number of tries. diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 3553a30..1b0fb2a 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -205,7 +205,7 @@ struct ColumnIOData Oid typid; /* column type id */ int32 typmod; /* column type modifier */ TypeCat typcat; /* column type category */ - ScalarIOData scalar_io; /* metadata cache for directi conversion + ScalarIOData scalar_io; /* metadata cache for direct conversion * through input function */ union { diff --git a/src/backend/utils/adt/rangetypes_gist.c b/src/backend/utils/adt/rangetypes_gist.c index 6f93ce6..b69cc85 100644 --- a/src/backend/utils/adt/rangetypes_gist.c +++ b/src/backend/utils/adt/rangetypes_gist.c @@ -1471,7 +1471,7 @@ single_bound_cmp(const void *a, const void *b, void *arg) } /* - * Compare NonEmptyRanges by lower bound. + * Compare NonEmptyRange's by lower bound. */ static int interval_cmp_lower(const void *a, const void *b, void *arg) @@ -1484,7 +1484,7 @@ interval_cmp_lower(const void *a, const void *b, void *arg) } /* - * Compare NonEmptyRanges by upper bound. + * Compare NonEmptyRange's by upper bound. */ static int interval_cmp_upper(const void *a, const void *b, void *arg) @@ -1497,7 +1497,7 @@ interval_cmp_upper(const void *a, const void *b, void *arg) } /* - * Compare CommonEntrys by their deltas. + * Compare CommonEntry's by their deltas. */ static int common_entry_cmp(const void *i1, const void *i2) diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c index faf5d10..311750e 100644 --- a/src/backend/utils/mmgr/freepage.c +++ b/src/backend/utils/mmgr/freepage.c @@ -1692,7 +1692,7 @@ FreePageManagerPutInternal(FreePageManager *fpm, Size first_page, Size npages, /* * The act of allocating pages to recycle may have invalidated the - * results of our previous btree reserch, so repeat it. (We could + * results of our previous btree research, so repeat it. (We could * recheck whether any of our split-avoidance strategies that were * not viable before now are, but it hardly seems worthwhile, so * we don't bother. Consolidation can't be possible now if it diff --git a/src/bin/pg_upgrade/parallel.c b/src/bin/pg_upgrade/parallel.c index d3d3401..39c508e 100644 --- a/src/bin/pg_upgrade/parallel.c +++ b/src/bin/pg_upgrade/parallel.c @@ -333,7 +333,7 @@ reap_child(bool wait_for_child) thread_handles[thread_num] = thread_handles[parallel_jobs - 1]; /* - * Move last active thead arg struct into the now-dead slot, and the + * Move last active thread arg struct into the now-dead slot, and the * now-dead slot to the end for reuse by the next thread. Though the * thread struct is in use by another thread, we can safely swap the * struct pointers within the array. diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e00dbab..2b1e3cd 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1490,7 +1490,7 @@ psql_completion(const char *text, int start, int end) else if (TailMatches("CREATE")) matches = completion_matches(text, create_command_generator); - /* complete with somthing you can create or replace */ + /* complete with something you can create or replace */ else if (TailMatches("CREATE", "OR", "REPLACE")) COMPLETE_WITH("FUNCTION", "PROCEDURE", "LANGUAGE", "RULE", "VIEW", "AGGREGATE", "TRANSFORM"); diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index bbaf450..d921b97 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -819,7 +819,7 @@ rfmtlong(long lng_val, const char *fmt, char *outbuf) sign = 1; if (leftalign) { - /* can't use strncat(,,0) here, Solaris would freek out */ + /* can't use strncat(,,0) here, Solaris would freak out */ if (sign) if (signdone) { diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 5b3c9a7..48ba50b 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -17,7 +17,7 @@ #include "pgtypeslib_extern.h" /* copy&pasted from .../src/backend/utils/adt/datetime.c - * and changesd struct pg_tm to struct tm + * and changed struct pg_tm to struct tm */ static void AdjustFractSeconds(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale) @@ -35,7 +35,7 @@ AdjustFractSeconds(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale /* copy&pasted from .../src/backend/utils/adt/datetime.c - * and changesd struct pg_tm to struct tm + * and changed struct pg_tm to struct tm */ static void AdjustFractDays(double frac, struct /* pg_ */ tm *tm, fsec_t *fsec, int scale) @@ -88,7 +88,7 @@ ISO8601IntegerWidth(const char *fieldstart) /* copy&pasted from .../src/backend/utils/adt/datetime.c - * and changesd struct pg_tm to struct tm + * and changed struct pg_tm to struct tm */ static inline void ClearPgTm(struct /* pg_ */ tm *tm, fsec_t *fsec) @@ -104,7 +104,7 @@ ClearPgTm(struct /* pg_ */ tm *tm, fsec_t *fsec) /* copy&pasted from .../src/backend/utils/adt/datetime.c * - * * changesd struct pg_tm to struct tm + * * changed struct pg_tm to struct tm * * * Made the function static */ @@ -311,7 +311,7 @@ DecodeISO8601Interval(char *str, /* copy&pasted from .../src/backend/utils/adt/datetime.c * with 3 exceptions * - * * changesd struct pg_tm to struct tm + * * changed struct pg_tm to struct tm * * * ECPG code called this without a 'range' parameter * removed 'int range' from the argument list and -- 1.8.3.1