From 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 16 Aug 2017 00:22:32 -0400 Subject: Change TRUE/FALSE to true/false The lower case spellings are C and C++ standard and are used in most parts of the PostgreSQL sources. The upper case spellings are only used in some files/modules. So standardize on the standard spellings. The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so those are left as is when using those APIs. In code comments, we use the lower-case spelling for the C concepts and keep the upper-case spelling for the SQL concepts. Reviewed-by: Michael Paquier --- doc/src/sgml/gin.sgml | 28 ++++++++++++++-------------- doc/src/sgml/indexam.sgml | 26 +++++++++++++------------- doc/src/sgml/libpq.sgml | 4 ++-- doc/src/sgml/spgist.sgml | 2 +- doc/src/sgml/sslinfo.sgml | 6 +++--- 5 files changed, 33 insertions(+), 33 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml index d63d8af4405..95d6278d288 100644 --- a/doc/src/sgml/gin.sgml +++ b/doc/src/sgml/gin.sgml @@ -223,9 +223,9 @@ pmatch is an output argument for use when partial match is supported. To use it, extractQuery must allocate - an array of *nkeys booleans and store its address at - *pmatch. Each element of the array should be set to TRUE - if the corresponding key requires partial match, FALSE if not. + an array of *nkeys bools and store its address at + *pmatch. Each element of the array should be set to true + if the corresponding key requires partial match, false if not. If *pmatch is set to NULL then GIN assumes partial match is not required. The variable is initialized to NULL before call, so this argument can simply be ignored by operator classes that do @@ -267,7 +267,7 @@ Datum queryKeys[], bool nullFlags[]) - Returns TRUE if an indexed item satisfies the query operator with + Returns true if an indexed item satisfies the query operator with strategy number n (or might satisfy it, if the recheck indication is returned). This function does not have direct access to the indexed item's value, since GIN does not @@ -277,8 +277,8 @@ nkeys, which is the same as the number of keys previously returned by extractQuery for this query datum. Each element of the - check array is TRUE if the indexed item contains the - corresponding query key, i.e., if (check[i] == TRUE) the i-th key of the + check array is true if the indexed item contains the + corresponding query key, i.e., if (check[i] == true) the i-th key of the extractQuery result array is present in the indexed item. The original query datum is passed in case the consistent method needs to consult it, @@ -291,7 +291,7 @@ When extractQuery returns a null key in queryKeys[], the corresponding check[] element - is TRUE if the indexed item contains a null key; that is, the + is true if the indexed item contains a null key; that is, the semantics of check[] are like IS NOT DISTINCT FROM. The consistent function can examine the corresponding nullFlags[] element if it needs to tell @@ -299,13 +299,13 @@ - On success, *recheck should be set to TRUE if the heap - tuple needs to be rechecked against the query operator, or FALSE if - the index test is exact. That is, a FALSE return value guarantees - that the heap tuple does not match the query; a TRUE return value with - *recheck set to FALSE guarantees that the heap tuple does - match the query; and a TRUE return value with - *recheck set to TRUE means that the heap tuple might match + On success, *recheck should be set to true if the heap + tuple needs to be rechecked against the query operator, or false if + the index test is exact. That is, a false return value guarantees + that the heap tuple does not match the query; a true return value with + *recheck set to false guarantees that the heap tuple does + match the query; and a true return value with + *recheck set to true means that the heap tuple might match the query, so it needs to be fetched and rechecked by evaluating the query operator directly against the originally indexed item. diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index b06ffcdbffe..a94b188f22d 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -280,9 +280,9 @@ aminsert (Relation indexRelation, The function's Boolean result value is significant only when checkUnique is UNIQUE_CHECK_PARTIAL. - In this case a TRUE result means the new entry is known unique, whereas - FALSE means it might be non-unique (and a deferred uniqueness check must - be scheduled). For other cases a constant FALSE result is recommended. + In this case a true result means the new entry is known unique, whereas + false means it might be non-unique (and a deferred uniqueness check must + be scheduled). For other cases a constant false result is recommended. @@ -368,8 +368,8 @@ amcanreturn (Relation indexRelation, int attno); linkend="indexes-index-only-scans">index-only scans on the given column, by returning the indexed column values for an index entry in the form of an IndexTuple. The attribute number - is 1-based, i.e. the first column's attno is 1. Returns TRUE if supported, - else FALSE. If the access method does not support index-only scans at all, + is 1-based, i.e. the first column's attno is 1. Returns true if supported, + else false. If the access method does not support index-only scans at all, the amcanreturn field in its IndexAmRoutine struct can be set to NULL. @@ -532,15 +532,15 @@ amgettuple (IndexScanDesc scan, ScanDirection direction); Fetch the next tuple in the given scan, moving in the given - direction (forward or backward in the index). Returns TRUE if a tuple was - obtained, FALSE if no matching tuples remain. In the TRUE case the tuple + direction (forward or backward in the index). Returns true if a tuple was + obtained, false if no matching tuples remain. In the true case the tuple TID is stored into the scan structure. Note that success means only that the index contains an entry that matches the scan keys, not that the tuple necessarily still exists in the heap or will pass the caller's snapshot test. On success, amgettuple - must also set scan->xs_recheck to TRUE or FALSE. - FALSE means it is certain that the index entry matches the scan keys. - TRUE means this is not certain, and the conditions represented by the + must also set scan->xs_recheck to true or false. + False means it is certain that the index entry matches the scan keys. + true means this is not certain, and the conditions represented by the scan keys must be rechecked against the heap tuple after fetching it. This provision supports lossy index operators. Note that rechecking will extend only to the scan conditions; a partial @@ -550,7 +550,7 @@ amgettuple (IndexScanDesc scan, If the index supports index-only - scans (i.e., amcanreturn returns TRUE for it), + scans (i.e., amcanreturn returns true for it), then on success the AM must also check scan->xs_want_itup, and if that is true it must return the originally indexed data for the index entry. The data can be returned in the form of an @@ -1082,8 +1082,8 @@ amparallelrescan (IndexScanDesc scan); constraint is deferrable. PostgreSQL will use this mode to insert each row's index entry. The access method must allow duplicate entries into the index, and report any - potential duplicates by returning FALSE from aminsert. - For each row for which FALSE is returned, a deferred recheck will + potential duplicates by returning false from aminsert. + For each row for which false is returned, a deferred recheck will be scheduled. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 9f468b7fdc9..694921f2126 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -6970,12 +6970,12 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough) break; } - /* unknown event ID, just return TRUE. */ + /* unknown event ID, just return true. */ default: break; } - return TRUE; /* event processing succeeded */ + return true; /* event processing succeeded */ } ]]> diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml index 1b5f654a1b9..c56a3544833 100644 --- a/doc/src/sgml/spgist.sgml +++ b/doc/src/sgml/spgist.sgml @@ -794,7 +794,7 @@ typedef struct spgLeafConsistentOut trees, in which each level of the tree includes a prefix that is short enough to fit on a page, and the final leaf level includes a suffix also short enough to fit on a page. The operator class should set - longValuesOK to TRUE only if it is prepared to arrange for + longValuesOK to true only if it is prepared to arrange for this to happen. Otherwise, the SP-GiST core will reject any request to index a value that is too large to fit on an index page. diff --git a/doc/src/sgml/sslinfo.sgml b/doc/src/sgml/sslinfo.sgml index 308e3e03a48..cda09aaafd2 100644 --- a/doc/src/sgml/sslinfo.sgml +++ b/doc/src/sgml/sslinfo.sgml @@ -32,7 +32,7 @@ - Returns TRUE if current connection to server uses SSL, and FALSE + Returns true if current connection to server uses SSL, and false otherwise. @@ -77,8 +77,8 @@ - Returns TRUE if current client has presented a valid SSL client - certificate to the server, and FALSE otherwise. (The server + Returns true if current client has presented a valid SSL client + certificate to the server, and false otherwise. (The server might or might not be configured to require a client certificate.) -- cgit v1.2.3