mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Fix some typos, grammar and style in docs and comments
The portions fixing the documentation are backpatched where needed. Author: Justin Pryzby Discussion: https://postgr.es/m/20210210235557.GQ20012@telsasoft.com backpatch-through: 9.6
This commit is contained in:
@ -719,11 +719,11 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
|
||||
}
|
||||
|
||||
/*
|
||||
* Expand a tuple which has less attributes than required. For each attribute
|
||||
* Expand a tuple which has fewer attributes than required. For each attribute
|
||||
* not present in the sourceTuple, if there is a missing value that will be
|
||||
* used. Otherwise the attribute will be set to NULL.
|
||||
*
|
||||
* The source tuple must have less attributes than the required number.
|
||||
* The source tuple must have fewer attributes than the required number.
|
||||
*
|
||||
* Only one of targetHeapTuple and targetMinimalTuple may be supplied. The
|
||||
* other argument must be NULL.
|
||||
|
@ -433,8 +433,7 @@ XLogReadBufferForRedoExtended(XLogReaderState *record,
|
||||
* NB: A redo function should normally not call this directly. To get a page
|
||||
* to modify, use XLogReadBufferForRedoExtended instead. It is important that
|
||||
* all pages modified by a WAL record are registered in the WAL records, or
|
||||
* they will be invisible to tools that that need to know which pages are
|
||||
* modified.
|
||||
* they will be invisible to tools that need to know which pages are modified.
|
||||
*/
|
||||
Buffer
|
||||
XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,
|
||||
|
@ -186,7 +186,7 @@ get_am_oid(const char *amname, bool missing_ok)
|
||||
}
|
||||
|
||||
/*
|
||||
* get_am_name - given an access method OID name and type, look up its name.
|
||||
* get_am_name - given an access method OID, look up its name.
|
||||
*/
|
||||
char *
|
||||
get_am_name(Oid amOid)
|
||||
|
@ -2070,8 +2070,7 @@ initialize_hash_entry(AggState *aggstate, TupleHashTable hashtable,
|
||||
}
|
||||
|
||||
/*
|
||||
* Look up hash entries for the current tuple in all hashed grouping sets,
|
||||
* returning an array of pergroup pointers suitable for advance_aggregates.
|
||||
* Look up hash entries for the current tuple in all hashed grouping sets.
|
||||
*
|
||||
* Be aware that lookup_hash_entry can reset the tmpcontext.
|
||||
*
|
||||
|
@ -71,7 +71,7 @@ static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
|
||||
*
|
||||
* Information about the aggregates and transition functions are collected
|
||||
* in the root->agginfos and root->aggtransinfos lists. The 'aggtranstype',
|
||||
* 'aggno', and 'aggtransno' fields in are filled in in each Aggref.
|
||||
* 'aggno', and 'aggtransno' fields of each Aggref are filled in.
|
||||
*
|
||||
* NOTE: This modifies the Aggrefs in the input expression in-place!
|
||||
*
|
||||
|
@ -2075,7 +2075,7 @@ GetSnapshotDataReuse(Snapshot snapshot)
|
||||
* holding ProcArrayLock) exclusively). Thus the xactCompletionCount check
|
||||
* ensures we would detect if the snapshot would have changed.
|
||||
*
|
||||
* As the snapshot contents are the same as it was before, it is is safe
|
||||
* As the snapshot contents are the same as it was before, it is safe
|
||||
* to re-enter the snapshot's xmin into the PGPROC array. None of the rows
|
||||
* visible under the snapshot could already have been removed (that'd
|
||||
* require the set of running transactions to change) and it fulfills the
|
||||
|
@ -263,7 +263,7 @@ static int compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2,
|
||||
* implement @? and @@ operators, which in turn are intended to have an
|
||||
* index support. Thus, it's desirable to make it easier to achieve
|
||||
* consistency between index scan results and sequential scan results.
|
||||
* So, we throw as less errors as possible. Regarding this function,
|
||||
* So, we throw as few errors as possible. Regarding this function,
|
||||
* such behavior also matches behavior of JSON_EXISTS() clause of
|
||||
* SQL/JSON. Regarding jsonb_path_match(), this function doesn't have
|
||||
* an analogy in SQL/JSON, so we define its behavior on our own.
|
||||
|
@ -645,7 +645,7 @@ scalarineqsel(PlannerInfo *root, Oid operator, bool isgt, bool iseq,
|
||||
|
||||
/*
|
||||
* The calculation so far gave us a selectivity for the "<=" case.
|
||||
* We'll have one less tuple for "<" and one additional tuple for
|
||||
* We'll have one fewer tuple for "<" and one additional tuple for
|
||||
* ">=", the latter of which we'll reverse the selectivity for
|
||||
* below, so we can simply subtract one tuple for both cases. The
|
||||
* cases that need this adjustment can be identified by iseq being
|
||||
|
2
src/backend/utils/cache/catcache.c
vendored
2
src/backend/utils/cache/catcache.c
vendored
@ -1497,7 +1497,7 @@ GetCatCacheHashValue(CatCache *cache,
|
||||
* It doesn't make any sense to specify all of the cache's key columns
|
||||
* here: since the key is unique, there could be at most one match, so
|
||||
* you ought to use SearchCatCache() instead. Hence this function takes
|
||||
* one less Datum argument than SearchCatCache() does.
|
||||
* one fewer Datum argument than SearchCatCache() does.
|
||||
*
|
||||
* The caller must not modify the list object or the pointed-to tuples,
|
||||
* and must call ReleaseCatCacheList() when done with the list.
|
||||
|
@ -539,7 +539,7 @@ process_queued_fetch_requests(libpq_source *src)
|
||||
chunkoff, rq->path, (int64) rq->offset);
|
||||
|
||||
/*
|
||||
* We should not receive receive more data than we requested, or
|
||||
* We should not receive more data than we requested, or
|
||||
* pg_read_binary_file() messed up. We could receive less,
|
||||
* though, if the file was truncated in the source after we
|
||||
* checked its size. That's OK, there should be a WAL record of
|
||||
|
@ -6458,7 +6458,7 @@ threadRun(void *arg)
|
||||
|
||||
/*
|
||||
* If advanceConnectionState changed client to finished state,
|
||||
* that's one less client that remains.
|
||||
* that's one fewer client that remains.
|
||||
*/
|
||||
if (st->state == CSTATE_FINISHED || st->state == CSTATE_ABORTED)
|
||||
remains--;
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
/*
|
||||
* Maximum length for identifiers (e.g. table names, column names,
|
||||
* function names). Names actually are limited to one less byte than this,
|
||||
* function names). Names actually are limited to one fewer byte than this,
|
||||
* because the length must include a trailing zero byte.
|
||||
*
|
||||
* Changing this requires an initdb.
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
/*
|
||||
* Maximum length for identifiers (e.g. table names, column names,
|
||||
* function names). Names actually are limited to one less byte than this,
|
||||
* function names). Names actually are limited to one fewer byte than this,
|
||||
* because the length must include a trailing zero byte.
|
||||
*
|
||||
* This should be at least as much as NAMEDATALEN of the database the
|
||||
|
@ -4325,7 +4325,7 @@ SELECT f1, polygon(8, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>';
|
||||
<(100,1),115> | ((-15,1),(18.6827201635,82.3172798365),(100,116),(181.317279836,82.3172798365),(215,1),(181.317279836,-80.3172798365),(100,-114),(18.6827201635,-80.3172798365))
|
||||
(6 rows)
|
||||
|
||||
-- Too less points error
|
||||
-- Error for insufficient number of points
|
||||
SELECT f1, polygon(1, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>';
|
||||
ERROR: must request at least 2 points
|
||||
-- Zero radius error
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- only use parallelism when explicitly intending to do so
|
||||
SET max_parallel_maintenance_workers = 0;
|
||||
SET max_parallel_workers = 0;
|
||||
-- A table with with contents that, when sorted, triggers abbreviated
|
||||
-- A table with contents that, when sorted, triggers abbreviated
|
||||
-- key aborts. One easy way to achieve that is to use uuids that all
|
||||
-- have the same prefix, as abbreviated keys for uuids just use the
|
||||
-- first sizeof(Datum) bytes.
|
||||
|
@ -424,7 +424,7 @@ SELECT f1, f1::polygon FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>';
|
||||
-- To polygon with less points
|
||||
SELECT f1, polygon(8, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>';
|
||||
|
||||
-- Too less points error
|
||||
-- Error for insufficient number of points
|
||||
SELECT f1, polygon(1, f1) FROM CIRCLE_TBL WHERE f1 >= '<(0,0),1>';
|
||||
|
||||
-- Zero radius error
|
||||
|
@ -2,7 +2,7 @@
|
||||
SET max_parallel_maintenance_workers = 0;
|
||||
SET max_parallel_workers = 0;
|
||||
|
||||
-- A table with with contents that, when sorted, triggers abbreviated
|
||||
-- A table with contents that, when sorted, triggers abbreviated
|
||||
-- key aborts. One easy way to achieve that is to use uuids that all
|
||||
-- have the same prefix, as abbreviated keys for uuids just use the
|
||||
-- first sizeof(Datum) bytes.
|
||||
|
Reference in New Issue
Block a user