Skip to content

Commit 6b85489

Browse files
committed
Fix inconsistencies in the code
This addresses a couple of issues in the code: - Typos and inconsistencies in comments and function declarations. - Removal of unreferenced function declarations. - Removal of unnecessary compile flags. - A cleanup error in regressplans.sh. Author: Alexander Lakhin Discussion: https://postgr.es/m/0c991fdf-2670-1997-c027-772a420c4604@gmail.com
1 parent 7e9a4c5 commit 6b85489

File tree

37 files changed

+52
-62
lines changed

37 files changed

+52
-62
lines changed

contrib/cube/cube.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
590590
v->spl_nright++;
591591
}
592592
}
593-
*left = *right = FirstOffsetNumber; /* sentinel value, see dosplit() */
593+
*left = *right = FirstOffsetNumber; /* sentinel value */
594594

595595
v->spl_ldatum = PointerGetDatum(datum_l);
596596
v->spl_rdatum = PointerGetDatum(datum_r);

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11036,7 +11036,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
1103611036
<entry><structfield>kinds</structfield></entry>
1103711037
<entry><type>text[]</type></entry>
1103811038
<entry></entry>
11039-
<entry>Types of exdended statistics enabled for this record</entry>
11039+
<entry>Types of extended statistics enabled for this record</entry>
1104011040
</row>
1104111041

1104211042
<row>

doc/src/sgml/gist.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ Datum
910910
my_fetch(PG_FUNCTION_ARGS)
911911
{
912912
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
913-
input_data_type *in = DatumGetP(entry->key);
913+
input_data_type *in = DatumGetPointer(entry->key);
914914
fetched_data_type *fetched_data;
915915
GISTENTRY *retval;
916916

src/backend/access/transam/multixact.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,10 @@ static bool SetOffsetVacuumLimit(bool is_startup);
367367
static bool find_multixact_start(MultiXactId multi, MultiXactOffset *result);
368368
static void WriteMZeroPageXlogRec(int pageno, uint8 info);
369369
static void WriteMTruncateXlogRec(Oid oldestMultiDB,
370-
MultiXactId startOff, MultiXactId endOff,
371-
MultiXactOffset startMemb, MultiXactOffset endMemb);
370+
MultiXactId startTruncOff,
371+
MultiXactId endTruncOff,
372+
MultiXactOffset startTruncMemb,
373+
MultiXactOffset endTruncMemb);
372374

373375

374376
/*
@@ -2784,7 +2786,7 @@ ReadMultiXactCounts(uint32 *multixacts, MultiXactOffset *members)
27842786

27852787
/*
27862788
* Multixact members can be removed once the multixacts that refer to them
2787-
* are older than every datminxmid. autovacuum_multixact_freeze_max_age and
2789+
* are older than every datminmxid. autovacuum_multixact_freeze_max_age and
27882790
* vacuum_multixact_freeze_table_age work together to make sure we never have
27892791
* too many multixacts; we hope that, at least under normal circumstances,
27902792
* this will also be sufficient to keep us from using too many offsets.

src/backend/catalog/aclchk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ expand_all_col_privileges(Oid table_oid, Form_pg_class classForm,
16411641

16421642
/*
16431643
* This processes attributes, but expects to be called from
1644-
* ExecGrant_Relation, not directly from ExecGrantStmt.
1644+
* ExecGrant_Relation, not directly from ExecuteGrantStmt.
16451645
*/
16461646
static void
16471647
ExecGrant_Attribute(InternalGrant *istmt, Oid relOid, const char *relname,

src/backend/catalog/namespace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,9 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation)
504504
* permission on the target namespace, this function will instead signal
505505
* an ERROR.
506506
*
507-
* If non-NULL, *existing_oid is set to the OID of any existing relation with
508-
* the same name which already exists in that namespace, or to InvalidOid if
509-
* no such relation exists.
507+
* If non-NULL, *existing_relation_id is set to the OID of any existing relation
508+
* with the same name which already exists in that namespace, or to InvalidOid
509+
* if no such relation exists.
510510
*
511511
* If lockmode != NoLock, the specified lock mode is acquired on the existing
512512
* relation, if any, provided that the current user owns the target relation.

src/backend/executor/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ Expression Evaluation
186186

187187
To allow for different methods of expression evaluation, and for
188188
better branch/jump target prediction, expressions are evaluated by
189-
calling ExprState->evalfunc (via ExprEvalExpr() and friends).
189+
calling ExprState->evalfunc (via ExecEvalExpr() and friends).
190190

191-
ExprReadyExpr() can choose the method of interpretation by setting
191+
ExecReadyExpr() can choose the method of interpretation by setting
192192
evalfunc to an appropriate function. The default execution function,
193193
ExecInterpExpr, is implemented in execExprInterp.c; see its header
194194
comment for details. Special-case evalfuncs are used for certain

src/backend/executor/execScan.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ ExecScanFetch(ScanState *node,
9898
* ExecScan
9999
*
100100
* Scans the relation using the 'access method' indicated and
101-
* returns the next qualifying tuple in the direction specified
102-
* in the global variable ExecDirection.
101+
* returns the next qualifying tuple.
103102
* The access method returns the next tuple and ExecScan() is
104103
* responsible for checking the tuple returned against the qual-clause.
105104
*

src/backend/executor/execTuples.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ ExecAllocTableSlot(List **tupleTable, TupleDesc desc,
11481148
* This releases any resources (buffer pins, tupdesc refcounts)
11491149
* held by the tuple table, and optionally releases the memory
11501150
* occupied by the tuple table data structure.
1151-
* It is expected that this routine be called by EndPlan().
1151+
* It is expected that this routine be called by ExecEndPlan().
11521152
* --------------------------------
11531153
*/
11541154
void

src/backend/executor/nodeProjectSet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ ExecProjectSRF(ProjectSetState *node, bool continuing)
196196
Assert(hassrf);
197197

198198
/*
199-
* If all the SRFs returned EndResult, we consider that as no row being
200-
* produced.
199+
* If all the SRFs returned ExprEndResult, we consider that as no row
200+
* being produced.
201201
*/
202202
if (hasresult)
203203
{

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