Skip to content

Commit 88e9471

Browse files
committed
Fix typos and grammar in the code
The large majority of these have been introduced by recent commits done in the v18 development cycle. Author: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/9a7763ab-5252-429d-a943-b28941e0e28b@gmail.com
1 parent 114f7fa commit 88e9471

File tree

45 files changed

+68
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+68
-69
lines changed

contrib/amcheck/verify_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "utils/relcache.h"
1717
#include "miscadmin.h"
1818

19-
/* Typedefs for callback functions for amcheck_lock_relation */
19+
/* Typedefs for callback functions for amcheck_lock_relation_and_check */
2020
typedef void (*IndexCheckableCallback) (Relation index);
2121
typedef void (*IndexDoCheckCallback) (Relation rel,
2222
Relation heaprel,

contrib/amcheck/verify_gin.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ gin_check_posting_tree_parent_keys_consistency(Relation rel, BlockNumber posting
359359
ptr->depth = stack->depth + 1;
360360

361361
/*
362-
* Set rightmost parent key to invalid iterm pointer. Its
363-
* value is 'Infinity' and not explicitly stored.
362+
* Set rightmost parent key to invalid item pointer. Its value
363+
* is 'Infinity' and not explicitly stored.
364364
*/
365365
if (rightlink == InvalidBlockNumber)
366366
ItemPointerSetInvalid(&ptr->parentkey);
@@ -587,7 +587,7 @@ gin_check_parent_keys_consistency(Relation rel,
587587

588588
/*
589589
* Check if it is properly adjusted. If succeed,
590-
* procced to the next key.
590+
* proceed to the next key.
591591
*/
592592
if (ginCompareEntries(&state, attnum, current_key,
593593
current_key_category, parent_key,

contrib/pg_buffercache/pg_buffercache_pages.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pg_buffercache_pages(PG_FUNCTION_ARGS)
289289
*
290290
* Returns NUMA node ID for each memory page used by the buffer. Buffers may
291291
* be smaller or larger than OS memory pages. For each buffer we return one
292-
* entry for each memory page used by the buffer (it fhe buffer is smaller,
292+
* entry for each memory page used by the buffer (if the buffer is smaller,
293293
* it only uses a part of one memory page).
294294
*
295295
* We expect both sizes (for buffers and memory pages) to be a power-of-2, so
@@ -335,7 +335,7 @@ pg_buffercache_numa_pages(PG_FUNCTION_ARGS)
335335
* how the pages and buffers "align" in memory - the buffers may be
336336
* shifted in some way, using more memory pages than necessary.
337337
*
338-
* So we need to be careful about mappping buffers to memory pages. We
338+
* So we need to be careful about mapping buffers to memory pages. We
339339
* calculate the maximum number of pages a buffer might use, so that
340340
* we allocate enough space for the entries. And then we count the
341341
* actual number of entries as we scan the buffers.

contrib/pg_overexplain/expected/pg_overexplain.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ $$);
123123
RTI 1 (relation, inherited, in-from-clause):
124124
Eref: vegetables (id, name, genus)
125125
Relation: vegetables
126-
Relation Kind: parititioned_table
126+
Relation Kind: partitioned_table
127127
Relation Lock Mode: AccessShareLock
128128
Permission Info Index: 1
129129
RTI 2 (group):
@@ -250,7 +250,7 @@ $$);
250250
<In-From-Clause>true</In-From-Clause> +
251251
<Eref>vegetables (id, name, genus)</Eref> +
252252
<Relation>vegetables</Relation> +
253-
<Relation-Kind>parititioned_table</Relation-Kind> +
253+
<Relation-Kind>partitioned_table</Relation-Kind> +
254254
<Relation-Lock-Mode>AccessShareLock</Relation-Lock-Mode> +
255255
<Permission-Info-Index>1</Permission-Info-Index> +
256256
<Security-Barrier>false</Security-Barrier> +
@@ -454,7 +454,7 @@ SELECT * FROM vegetables WHERE genus = 'daucus';
454454
RTI 1 (relation, inherited, in-from-clause):
455455
Eref: vegetables (id, name, genus)
456456
Relation: vegetables
457-
Relation Kind: parititioned_table
457+
Relation Kind: partitioned_table
458458
Relation Lock Mode: AccessShareLock
459459
Permission Info Index: 1
460460
RTI 2 (relation, in-from-clause):
@@ -478,7 +478,7 @@ INSERT INTO vegetables (name, genus) VALUES ('broccoflower', 'brassica');
478478
RTI 1 (relation):
479479
Eref: vegetables (id, name, genus)
480480
Relation: vegetables
481-
Relation Kind: parititioned_table
481+
Relation Kind: partitioned_table
482482
Relation Lock Mode: RowExclusiveLock
483483
Permission Info Index: 1
484484
RTI 2 (result):

contrib/pg_overexplain/pg_overexplain.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ overexplain_per_plan_hook(PlannedStmt *plannedstmt,
277277
* Print out various details from the PlannedStmt that wouldn't otherwise
278278
* be displayed.
279279
*
280-
* We don't try to print everything here. Information that would be displyed
280+
* We don't try to print everything here. Information that would be displayed
281281
* anyway doesn't need to be printed again here, and things with lots of
282282
* substructure probably should be printed via separate options, or not at all.
283283
*/
@@ -517,10 +517,10 @@ overexplain_range_table(PlannedStmt *plannedstmt, ExplainState *es)
517517
relkind = "foreign_table";
518518
break;
519519
case RELKIND_PARTITIONED_TABLE:
520-
relkind = "parititioned_table";
520+
relkind = "partitioned_table";
521521
break;
522522
case RELKIND_PARTITIONED_INDEX:
523-
relkind = "parititioned_index";
523+
relkind = "partitioned_index";
524524
break;
525525
case '\0':
526526
relkind = NULL;
@@ -632,7 +632,7 @@ overexplain_range_table(PlannedStmt *plannedstmt, ExplainState *es)
632632
}
633633

634634
/*
635-
* add_rte_to_flat_rtable will clear coltypes, coltypemods, and
635+
* add_rte_to_flat_rtable will clear coltypes, coltypmods, and
636636
* colcollations, so skip those fields.
637637
*
638638
* If this is an ephemeral named relation, print out ENR-related
@@ -675,7 +675,7 @@ overexplain_range_table(PlannedStmt *plannedstmt, ExplainState *es)
675675
* Emit a text property describing the contents of an Alias.
676676
*
677677
* Column lists can be quite long here, so perhaps we should have an option
678-
* to limit the display length by # of columsn or # of characters, but for
678+
* to limit the display length by # of column or # of characters, but for
679679
* now, just display everything.
680680
*/
681681
static void

contrib/postgres_fdw/t/001_auth_scram.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Test SCRAM authentication when opening a new connection with a foreign
44
# server.
55
#
6-
# The test is executed by testing the SCRAM authentifcation on a looplback
6+
# The test is executed by testing the SCRAM authentifcation on a loopback
77
# connection on the same server and with different servers.
88

99
use strict;

doc/src/sgml/ref/pg_dump.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ PostgreSQL documentation
13151315
</para>
13161316
<para>
13171317
The data section contains actual table data, large-object
1318-
contents, statitistics for tables and materialized views and
1318+
contents, statistics for tables and materialized views and
13191319
sequence values.
13201320
Post-data items include definitions of indexes, triggers, rules,
13211321
statistics for indexes, and constraints other than validated check

doc/src/sgml/regress.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ make check-world PG_TEST_EXTRA='kerberos ldap ssl load_balance libpq_encryption'
353353
<listitem>
354354
<para>
355355
Runs the test suite under <filename>src/test/modules/oauth_validator</filename>.
356-
This opens TCP/IP listen sockets for a test-server running HTTPS.
356+
This opens TCP/IP listen sockets for a test server running HTTPS.
357357
</para>
358358
</listitem>
359359
</varlistentry>

src/backend/access/gin/gininsert.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ typedef struct
167167

168168
/*
169169
* The sortstate used only within a single worker for the first merge pass
170-
* happenning there. In principle it doesn't need to be part of the build
170+
* happening there. In principle it doesn't need to be part of the build
171171
* state and we could pass it around directly, but it's more convenient
172172
* this way. And it's part of the build state, after all.
173173
*/
@@ -1306,7 +1306,7 @@ GinBufferIsEmpty(GinBuffer *buffer)
13061306
* Compare if the tuple matches the already accumulated data in the GIN
13071307
* buffer. Compare scalar fields first, before the actual key.
13081308
*
1309-
* Returns true if the key matches, and the TID belonds to the buffer, or
1309+
* Returns true if the key matches, and the TID belongs to the buffer, or
13101310
* false if the key does not match.
13111311
*/
13121312
static bool
@@ -1497,7 +1497,7 @@ GinBufferStoreTuple(GinBuffer *buffer, GinTuple *tup)
14971497
buffer->items = repalloc(buffer->items,
14981498
(buffer->nitems + tup->nitems) * sizeof(ItemPointerData));
14991499

1500-
new = ginMergeItemPointers(&buffer->items[buffer->nfrozen], /* first unfronzen */
1500+
new = ginMergeItemPointers(&buffer->items[buffer->nfrozen], /* first unfrozen */
15011501
(buffer->nitems - buffer->nfrozen), /* num of unfrozen */
15021502
items, tup->nitems, &nnew);
15031503

@@ -1531,7 +1531,7 @@ GinBufferReset(GinBuffer *buffer)
15311531
pfree(DatumGetPointer(buffer->key));
15321532

15331533
/*
1534-
* Not required, but makes it more likely to trigger NULL derefefence if
1534+
* Not required, but makes it more likely to trigger NULL dereference if
15351535
* using the value incorrectly, etc.
15361536
*/
15371537
buffer->key = (Datum) 0;
@@ -1603,7 +1603,7 @@ GinBufferCanAddKey(GinBuffer *buffer, GinTuple *tup)
16031603
*
16041604
* After waiting for all workers to finish, merge the per-worker results into
16051605
* the complete index. The results from each worker are sorted by block number
1606-
* (start of the page range). While combinig the per-worker results we merge
1606+
* (start of the page range). While combining the per-worker results we merge
16071607
* summaries for the same page range, and also fill-in empty summaries for
16081608
* ranges without any tuples.
16091609
*

src/backend/access/nbtree/nbtsearch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ _bt_readpage(IndexScanDesc scan, ScanDirection dir, OffsetNumber offnum,
17921792

17931793
truncatt = BTreeTupleGetNAtts(itup, rel);
17941794
pstate.forcenonrequired = false;
1795-
pstate.startikey = 0; /* _bt_set_startikey ignores HIKEY */
1795+
pstate.startikey = 0; /* _bt_set_startikey ignores P_HIKEY */
17961796
_bt_checkkeys(scan, &pstate, arrayKeys, itup, truncatt);
17971797
}
17981798

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy