1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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 <michael.paquier@gmail.com>
This commit is contained in:
Peter Eisentraut
2017-08-16 00:22:32 -04:00
parent 4497f2f3b3
commit 2eb4a831e5
216 changed files with 1168 additions and 1168 deletions

View File

@ -1791,7 +1791,7 @@ GetSnapshotData(Snapshot snapshot)
* check that the source transaction is still running, and we'd better do
* that atomically with installing the new xmin.
*
* Returns TRUE if successful, FALSE if source xact is no longer running.
* Returns true if successful, false if source xact is no longer running.
*/
bool
ProcArrayInstallImportedXmin(TransactionId xmin,
@ -1866,7 +1866,7 @@ ProcArrayInstallImportedXmin(TransactionId xmin,
* PGPROC of the transaction from which we imported the snapshot, rather than
* an XID.
*
* Returns TRUE if successful, FALSE if source xact is no longer running.
* Returns true if successful, false if source xact is no longer running.
*/
bool
ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc)
@ -2873,7 +2873,7 @@ CountUserBackends(Oid roleid)
* The current backend is always ignored; it is caller's responsibility to
* check whether the current backend uses the given DB, if it's important.
*
* Returns TRUE if there are (still) other backends in the DB, FALSE if not.
* Returns true if there are (still) other backends in the DB, false if not.
* Also, *nbackends and *nprepared are set to the number of other backends
* and prepared transactions in the DB, respectively.
*

View File

@ -257,7 +257,7 @@ ShmemAllocUnlocked(Size size)
/*
* ShmemAddrIsValid -- test if an address refers to shared memory
*
* Returns TRUE if the pointer points within the shared memory segment.
* Returns true if the pointer points within the shared memory segment.
*/
bool
ShmemAddrIsValid(const void *addr)
@ -361,7 +361,7 @@ ShmemInitHash(const char *name, /* table string name for shmem index */
* for it. If it exists already, a pointer to the existing
* structure is returned.
*
* Returns: pointer to the object. *foundPtr is set TRUE if the object was
* Returns: pointer to the object. *foundPtr is set true if the object was
* already in the shmem index (hence, already initialized).
*
* Note: before Postgres 9.0, this function returned NULL for some failure
@ -388,7 +388,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
/* Must be initializing a (non-standalone) backend */
Assert(shmemseghdr->index != NULL);
structPtr = shmemseghdr->index;
*foundPtr = TRUE;
*foundPtr = true;
}
else
{
@ -403,7 +403,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
Assert(shmemseghdr->index == NULL);
structPtr = ShmemAlloc(size);
shmemseghdr->index = structPtr;
*foundPtr = FALSE;
*foundPtr = false;
}
LWLockRelease(ShmemIndexLock);
return structPtr;

View File

@ -40,7 +40,7 @@ SHMQueueInit(SHM_QUEUE *queue)
}
/*
* SHMQueueIsDetached -- TRUE if element is not currently
* SHMQueueIsDetached -- true if element is not currently
* in a queue.
*/
bool
@ -174,7 +174,7 @@ SHMQueuePrev(const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset)
}
/*
* SHMQueueEmpty -- TRUE if queue head is only element, FALSE otherwise
* SHMQueueEmpty -- true if queue head is only element, false otherwise
*/
bool
SHMQueueEmpty(const SHM_QUEUE *queue)
@ -184,7 +184,7 @@ SHMQueueEmpty(const SHM_QUEUE *queue)
if (queue->prev == queue)
{
Assert(queue->next == queue);
return TRUE;
return true;
}
return FALSE;
return false;
}

View File

@ -627,7 +627,7 @@ SIGetDataEntries(SharedInvalidationMessage *data, int datasize)
* SICleanupQueue
* Remove messages that have been consumed by all active backends
*
* callerHasWriteLock is TRUE if caller is holding SInvalWriteLock.
* callerHasWriteLock is true if caller is holding SInvalWriteLock.
* minFree is the minimum number of message slots to make free.
*
* Possible side effects of this routine include marking one or more