Skip to content

Commit ed529fa

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 4beb25c commit ed529fa

File tree

18 files changed

+25
-25
lines changed

18 files changed

+25
-25
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
@@ -6573,7 +6573,7 @@ Delete
65736573
<listitem>
65746574
<para>
65756575
Identifies the following TupleData message as a old tuple.
6576-
This field is is present if the table in which the delete has
6576+
This field is present if the table in which the delete has
65776577
happened has REPLICA IDENTITY set to FULL.
65786578
</para>
65796579
</listitem>

doc/src/sgml/spi.sgml

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

26562656
<refnamediv>
26572657
<refname>SPI_register_relation</refname>
2658-
<refpurpose>make a ephemeral named relation available by name in SPI queries</refpurpose>
2658+
<refpurpose>make an ephemeral named relation available by name in SPI queries</refpurpose>
26592659
</refnamediv>
26602660

26612661
<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
@@ -1565,7 +1565,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
15651565
* swap_relation_files()), thus relfrozenxid was not updated. That's
15661566
* annoying because a potential reason for doing a VACUUM FULL is a
15671567
* imminent or actual anti-wraparound shutdown. So, now that we can
1568-
* access the new relation using it's indices, update relfrozenxid.
1568+
* access the new relation using its indices, update relfrozenxid.
15691569
* pg_class doesn't have a toast relation, so we don't need to update the
15701570
* corresponding toast relation. Not that there's little point moving all
15711571
* relfrozenxid updates here since swap_relation_files() needs to write to

src/backend/executor/nodeModifyTable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ lreplace:;
10971097
* (but still lock row, even though it may not satisfy estate's
10981098
* snapshot).
10991099
*
1100-
* Returns true if if we're done (with or without an update), or false if
1100+
* Returns true if we're done (with or without an update), or false if
11011101
* the caller must retry the INSERT from scratch.
11021102
*/
11031103
static bool

src/backend/replication/logical/origin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ pg_show_replication_origin_status(PG_FUNCTION_ARGS)
14491449
int i;
14501450
#define REPLICATION_ORIGIN_PROGRESS_COLS 4
14511451

1452-
/* we we want to return 0 rows if slot is set to zero */
1452+
/* we want to return 0 rows if slot is set to zero */
14531453
replorigin_check_prerequisites(false, true);
14541454

14551455
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/parsenodes.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,7 +3376,7 @@ typedef struct AlterTSConfigurationStmt
33763376
typedef struct CreatePublicationStmt
33773377
{
33783378
NodeTag type;
3379-
char *pubname; /* Name of of the publication */
3379+
char *pubname; /* Name of the publication */
33803380
List *options; /* List of DefElem nodes */
33813381
List *tables; /* Optional list of tables to add */
33823382
bool for_all_tables; /* Special publication for all tables in db */
@@ -3385,7 +3385,7 @@ typedef struct CreatePublicationStmt
33853385
typedef struct AlterPublicationStmt
33863386
{
33873387
NodeTag type;
3388-
char *pubname; /* Name of of the publication */
3388+
char *pubname; /* Name of the publication */
33893389

33903390
/* parameters used for ALTER PUBLICATION ... WITH */
33913391
List *options; /* List of DefElem nodes */
@@ -3399,7 +3399,7 @@ typedef struct AlterPublicationStmt
33993399
typedef struct CreateSubscriptionStmt
34003400
{
34013401
NodeTag type;
3402-
char *subname; /* Name of of the subscription */
3402+
char *subname; /* Name of the subscription */
34033403
char *conninfo; /* Connection string to publisher */
34043404
List *publication; /* One or more publication to subscribe to */
34053405
List *options; /* List of DefElem nodes */
@@ -3418,7 +3418,7 @@ typedef struct AlterSubscriptionStmt
34183418
{
34193419
NodeTag type;
34203420
AlterSubscriptionType kind; /* ALTER_SUBSCRIPTION_OPTIONS, etc */
3421-
char *subname; /* Name of of the subscription */
3421+
char *subname; /* Name of the subscription */
34223422
char *conninfo; /* Connection string to publisher */
34233423
List *publication; /* One or more publication to subscribe to */
34243424
List *options; /* List of DefElem nodes */
@@ -3427,7 +3427,7 @@ typedef struct AlterSubscriptionStmt
34273427
typedef struct DropSubscriptionStmt
34283428
{
34293429
NodeTag type;
3430-
char *subname; /* Name of of the subscription */
3430+
char *subname; /* Name of the subscription */
34313431
bool missing_ok; /* Skip error if missing? */
34323432
DropBehavior behavior; /* RESTRICT or CASCADE behavior */
34333433
} DropSubscriptionStmt;

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/interfaces/ecpg/ecpglib/execute.c

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

src/pl/tcl/pltcl.c

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

27282728
/************************************************************
2729-
* If there was a argtype list on preparation, we need
2729+
* If there was an argtype list on preparation, we need
27302730
* an argument value list now
27312731
************************************************************/
27322732
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
@@ -2814,7 +2814,7 @@ Rules:
28142814
NOTIFY rules_src_deletion
28152815

28162816
--
2817-
-- Ensure a aliased target relation for insert is correctly deparsed.
2817+
-- Ensure an aliased target relation for insert is correctly deparsed.
28182818
--
28192819
create rule r4 as on insert to rules_src do instead insert into rules_log AS trgt SELECT NEW.* RETURNING trgt.f1, trgt.f2;
28202820
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)