Skip to content

Commit 6b38717

Browse files
committed
Fix misc typos, mostly in comments.
A collection of typos I happened to spot while reading code, as well as grepping for common mistakes. Backpatch to all supported versions, as applicable, to avoid conflicts when backporting other commits in the future.
1 parent 94019c8 commit 6b38717

File tree

25 files changed

+34
-34
lines changed

25 files changed

+34
-34
lines changed

contrib/bloom/blscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ blendscan(IndexScanDesc scan)
7676
}
7777

7878
/*
79-
* Insert all matching tuples into to a bitmap.
79+
* Insert all matching tuples into a bitmap.
8080
*/
8181
int64
8282
blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm)

doc/src/sgml/protocol.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6773,7 +6773,7 @@ Delete
67736773
<listitem>
67746774
<para>
67756775
Identifies the following TupleData message as a old tuple.
6776-
This field is is present if the table in which the delete has
6776+
This field is present if the table in which the delete has
67776777
happened has REPLICA IDENTITY set to FULL.
67786778
</para>
67796779
</listitem>

doc/src/sgml/spi.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ SPIPlanPtr SPI_saveplan(SPIPlanPtr <parameter>plan</parameter>)
26862686

26872687
<refnamediv>
26882688
<refname>SPI_register_relation</refname>
2689-
<refpurpose>make a ephemeral named relation available by name in SPI queries</refpurpose>
2689+
<refpurpose>make an ephemeral named relation available by name in SPI queries</refpurpose>
26902690
</refnamediv>
26912691

26922692
<refsynopsisdiv>

src/backend/access/transam/multixact.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,7 @@ SetOffsetVacuumLimit(bool is_startup)
25552555

25562556
/*
25572557
* NB: Have to prevent concurrent truncation, we might otherwise try to
2558-
* lookup a oldestMulti that's concurrently getting truncated away.
2558+
* lookup an oldestMulti that's concurrently getting truncated away.
25592559
*/
25602560
LWLockAcquire(MultiXactTruncationLock, LW_SHARED);
25612561

@@ -2732,7 +2732,7 @@ find_multixact_start(MultiXactId multi, MultiXactOffset *result)
27322732
/*
27332733
* Flush out dirty data, so PhysicalPageExists can work correctly.
27342734
* SimpleLruFlush() is a pretty big hammer for that. Alternatively we
2735-
* could add a in-memory version of page exists, but find_multixact_start
2735+
* could add an in-memory version of page exists, but find_multixact_start
27362736
* is called infrequently, and it doesn't seem bad to flush buffers to
27372737
* disk before truncation.
27382738
*/

src/backend/commands/cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
15811581
* swap_relation_files()), thus relfrozenxid was not updated. That's
15821582
* annoying because a potential reason for doing a VACUUM FULL is a
15831583
* imminent or actual anti-wraparound shutdown. So, now that we can
1584-
* access the new relation using it's indices, update relfrozenxid.
1584+
* access the new relation using its indices, update relfrozenxid.
15851585
* pg_class doesn't have a toast relation, so we don't need to update the
15861586
* corresponding toast relation. Not that there's little point moving all
15871587
* relfrozenxid updates here since swap_relation_files() needs to write to

src/backend/commands/explain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3341,7 +3341,7 @@ ExplainPropertyListNested(const char *qlabel, List *data, ExplainState *es)
33413341
* If "numeric" is true, the value is a number (or other value that
33423342
* doesn't need quoting in JSON).
33433343
*
3344-
* If unit is is non-NULL the text format will display it after the value.
3344+
* If unit is non-NULL the text format will display it after the value.
33453345
*
33463346
* This usually should not be invoked directly, but via one of the datatype
33473347
* specific routines ExplainPropertyText, ExplainPropertyInteger, etc.

src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ lreplace:;
13471347
* (but still lock row, even though it may not satisfy estate's
13481348
* snapshot).
13491349
*
1350-
* Returns true if if we're done (with or without an update), or false if
1350+
* Returns true if we're done (with or without an update), or false if
13511351
* the caller must retry the INSERT from scratch.
13521352
*/
13531353
static bool

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6908,8 +6908,8 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
69086908
scanjoin_targets_contain_srfs);
69096909

69106910
/*
6911-
* If the relation is partitioned, recurseively apply the same changes to
6912-
* all partitions and generate new Append paths. Since Append is not
6911+
* If the relation is partitioned, recursively apply the same changes to
6912+
* all partitions and generate new Append paths. Since Append is not
69136913
* projection-capable, that might save a separate Result node, and it also
69146914
* is important for partitionwise aggregate.
69156915
*/

src/backend/parser/parse_func.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,7 @@ LookupFuncWithArgs(ObjectType objtype, ObjectWithArgs *func, bool noError)
21952195
else if (func->args_unspecified)
21962196
ereport(ERROR,
21972197
(errcode(ERRCODE_UNDEFINED_FUNCTION),
2198-
errmsg("could not find a aggregate named \"%s\"",
2198+
errmsg("could not find an aggregate named \"%s\"",
21992199
NameListToString(func->objname))));
22002200
else if (argcount == 0)
22012201
ereport(ERROR,

src/backend/replication/logical/origin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ pg_show_replication_origin_status(PG_FUNCTION_ARGS)
14551455
int i;
14561456
#define REPLICATION_ORIGIN_PROGRESS_COLS 4
14571457

1458-
/* we we want to return 0 rows if slot is set to zero */
1458+
/* we want to return 0 rows if slot is set to zero */
14591459
replorigin_check_prerequisites(false, true);
14601460

14611461
if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo))

src/backend/utils/time/snapmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,8 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
10871087
* it's too late to abort the transaction, and (2) leaving a leaked
10881088
* file around has little real consequence anyway.
10891089
*
1090-
* We also also need to remove the snapshots from RegisteredSnapshots
1091-
* to prevent a warning below.
1090+
* We also need to remove the snapshots from RegisteredSnapshots to
1091+
* prevent a warning below.
10921092
*
10931093
* As with the FirstXactSnapshot, we don't need to free resources of
10941094
* the snapshot iself as it will go away with the memory context.

src/bin/initdb/t/001_initdb.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# To test successful data directory creation with a additional feature, first
1+
# To test successful data directory creation with an additional feature, first
22
# try to elaborate the "successful creation" test instead of adding a test.
33
# Successful initdb consumes much time and I/O.
44

src/bin/pg_upgrade/tablespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ init_tablespaces(void)
3434
* get_tablespace_paths()
3535
*
3636
* Scans pg_tablespace and returns a malloc'ed array of all tablespace
37-
* paths. Its the caller's responsibility to free the array.
37+
* paths. It's the caller's responsibility to free the array.
3838
*/
3939
static void
4040
get_tablespace_paths(void)

src/include/nodes/execnodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ typedef struct TupleHashTableData
676676
/* The following fields are set transiently for each table search: */
677677
TupleTableSlot *inputslot; /* current input tuple's slot */
678678
FmgrInfo *in_hash_funcs; /* hash functions for input datatype(s) */
679-
ExprState *cur_eq_func; /* comparator for for input vs. table */
679+
ExprState *cur_eq_func; /* comparator for input vs. table */
680680
uint32 hash_iv; /* hash-function IV */
681681
ExprContext *exprcontext; /* expression context */
682682
} TupleHashTableData;

src/include/nodes/parsenodes.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,7 +3433,7 @@ typedef struct AlterTSConfigurationStmt
34333433
typedef struct CreatePublicationStmt
34343434
{
34353435
NodeTag type;
3436-
char *pubname; /* Name of of the publication */
3436+
char *pubname; /* Name of the publication */
34373437
List *options; /* List of DefElem nodes */
34383438
List *tables; /* Optional list of tables to add */
34393439
bool for_all_tables; /* Special publication for all tables in db */
@@ -3442,7 +3442,7 @@ typedef struct CreatePublicationStmt
34423442
typedef struct AlterPublicationStmt
34433443
{
34443444
NodeTag type;
3445-
char *pubname; /* Name of of the publication */
3445+
char *pubname; /* Name of the publication */
34463446

34473447
/* parameters used for ALTER PUBLICATION ... WITH */
34483448
List *options; /* List of DefElem nodes */
@@ -3456,7 +3456,7 @@ typedef struct AlterPublicationStmt
34563456
typedef struct CreateSubscriptionStmt
34573457
{
34583458
NodeTag type;
3459-
char *subname; /* Name of of the subscription */
3459+
char *subname; /* Name of the subscription */
34603460
char *conninfo; /* Connection string to publisher */
34613461
List *publication; /* One or more publication to subscribe to */
34623462
List *options; /* List of DefElem nodes */
@@ -3475,7 +3475,7 @@ typedef struct AlterSubscriptionStmt
34753475
{
34763476
NodeTag type;
34773477
AlterSubscriptionType kind; /* ALTER_SUBSCRIPTION_OPTIONS, etc */
3478-
char *subname; /* Name of of the subscription */
3478+
char *subname; /* Name of the subscription */
34793479
char *conninfo; /* Connection string to publisher */
34803480
List *publication; /* One or more publication to subscribe to */
34813481
List *options; /* List of DefElem nodes */
@@ -3484,7 +3484,7 @@ typedef struct AlterSubscriptionStmt
34843484
typedef struct DropSubscriptionStmt
34853485
{
34863486
NodeTag type;
3487-
char *subname; /* Name of of the subscription */
3487+
char *subname; /* Name of the subscription */
34883488
bool missing_ok; /* Skip error if missing? */
34893489
DropBehavior behavior; /* RESTRICT or CASCADE behavior */
34903490
} DropSubscriptionStmt;

src/include/port/pg_bswap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pg_bswap64(uint64 x)
102102

103103

104104
/*
105-
* Portable and fast equivalents for for ntohs, ntohl, htons, htonl,
105+
* Portable and fast equivalents for ntohs, ntohl, htons, htonl,
106106
* additionally extended to 64 bits.
107107
*/
108108
#ifdef WORDS_BIGENDIAN

src/include/storage/latch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ typedef struct Latch
129129
#ifdef WIN32
130130
#define WL_SOCKET_CONNECTED (1 << 5)
131131
#else
132-
/* avoid having to to deal with case on platforms not requiring it */
132+
/* avoid having to deal with case on platforms not requiring it */
133133
#define WL_SOCKET_CONNECTED WL_SOCKET_WRITEABLE
134134
#endif
135135

src/include/utils/rel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ typedef struct ForeignKeyCacheInfo
218218
} ForeignKeyCacheInfo;
219219

220220
/*
221-
* Options common for all all indexes
221+
* Options common for all indexes
222222
*/
223223
typedef struct GenericIndexOpts
224224
{

src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,8 +1308,8 @@ ecpg_build_params(struct statement *stmt)
13081308
if ((position = next_insert(stmt->command, position, stmt->questionmarks, std_strings) + 1) == 0)
13091309
{
13101310
/*
1311-
* We have an argument but we dont have the matched up placeholder
1312-
* in the string
1311+
* We have an argument but we don't have the matched up
1312+
* placeholder in the string
13131313
*/
13141314
ecpg_raise(stmt->lineno, ECPG_TOO_MANY_ARGUMENTS,
13151315
ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS,

src/interfaces/ecpg/preproc/parse.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ sub main
144144
# flds are the fields to use. These may start with a '$' - in
145145
# which case they are the result of a previous non-terminal
146146
#
147-
# if they dont start with a '$' then they are token name
147+
# if they don't start with a '$' then they are token name
148148
#
149149
# len is the number of fields in flds...
150150
# leadin is the padding to apply at the beginning (just use for formatting)
@@ -223,7 +223,7 @@ sub main
223223
next line;
224224
}
225225

226-
# Dont worry about anything if we're not in the right section of gram.y
226+
# Don't worry about anything if we're not in the right section of gram.y
227227
if ($yaccmode != 1)
228228
{
229229
next line;

src/pl/tcl/pltcl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2762,7 +2762,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
27622762
}
27632763

27642764
/************************************************************
2765-
* If there was a argtype list on preparation, we need
2765+
* If there was an argtype list on preparation, we need
27662766
* an argument value list now
27672767
************************************************************/
27682768
if (qdesc->nargs > 0)

src/test/regress/expected/rowsecurity.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ SET SESSION AUTHORIZATION regress_rls_bob;
21082108
INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert')
21092109
ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *;
21102110
ERROR: new row violates row-level security policy for table "document"
2111-
-- UPDATE path is taken here. Existing tuple passes, since it's cid
2111+
-- UPDATE path is taken here. Existing tuple passes, since its cid
21122112
-- corresponds to "novel", but default USING qual is enforced against
21132113
-- post-UPDATE tuple too (as always when updating with a policy that lacks an
21142114
-- explicit WCO), and so this fails:

src/test/regress/expected/rules.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2818,7 +2818,7 @@ Rules:
28182818
NOTIFY rules_src_deletion
28192819

28202820
--
2821-
-- Ensure a aliased target relation for insert is correctly deparsed.
2821+
-- Ensure an aliased target relation for insert is correctly deparsed.
28222822
--
28232823
create rule r4 as on insert to rules_src do instead insert into rules_log AS trgt SELECT NEW.* RETURNING trgt.f1, trgt.f2;
28242824
create rule r5 as on update to rules_src do instead UPDATE rules_log AS trgt SET tag = 'updated' WHERE trgt.f1 = new.f1;

src/test/regress/sql/rowsecurity.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ SET SESSION AUTHORIZATION regress_rls_bob;
781781
INSERT INTO document VALUES (79, (SELECT cid from category WHERE cname = 'technology'), 1, 'regress_rls_bob', 'technology book, can only insert')
782782
ON CONFLICT (did) DO UPDATE SET dtitle = EXCLUDED.dtitle RETURNING *;
783783

784-
-- UPDATE path is taken here. Existing tuple passes, since it's cid
784+
-- UPDATE path is taken here. Existing tuple passes, since its cid
785785
-- corresponds to "novel", but default USING qual is enforced against
786786
-- post-UPDATE tuple too (as always when updating with a policy that lacks an
787787
-- explicit WCO), and so this fails:

src/test/regress/sql/rules.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ create rule r3 as on delete to rules_src do notify rules_src_deletion;
10071007
\d+ rules_src
10081008

10091009
--
1010-
-- Ensure a aliased target relation for insert is correctly deparsed.
1010+
-- Ensure an aliased target relation for insert is correctly deparsed.
10111011
--
10121012
create rule r4 as on insert to rules_src do instead insert into rules_log AS trgt SELECT NEW.* RETURNING trgt.f1, trgt.f2;
10131013
create rule r5 as on update to rules_src do instead UPDATE rules_log AS trgt SET tag = 'updated' WHERE trgt.f1 = new.f1;

0 commit comments

Comments
 (0)