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

@ -32,7 +32,7 @@ static ScanState *search_plan_tree(PlanState *node, Oid table_oid);
* of the table is currently being scanned by the cursor named by CURRENT OF,
* and return the row's TID into *current_tid.
*
* Returns TRUE if a row was identified. Returns FALSE if the cursor is valid
* Returns true if a row was identified. Returns false if the cursor is valid
* for the table but is not currently scanning a row of the table (this is a
* legal situation in inheritance cases). Raises error if cursor is not a
* valid updatable scan of the specified table.

View File

@ -1487,8 +1487,8 @@ ExecCleanUpTriggerState(EState *estate)
* going to be stored into a relation that has OIDs. In other contexts
* we are free to choose whether to leave space for OIDs in result tuples
* (we generally don't want to, but we do if a physical-tlist optimization
* is possible). This routine checks the plan context and returns TRUE if the
* choice is forced, FALSE if the choice is not forced. In the TRUE case,
* is possible). This routine checks the plan context and returns true if the
* choice is forced, false if the choice is not forced. In the true case,
* *hasoids is set to the required value.
*
* One reason this is ugly is that all plan nodes in the plan tree will emit

View File

@ -2628,7 +2628,7 @@ agg_retrieve_hash_table(AggState *aggstate)
else
{
/* No more hashtables, so done */
aggstate->agg_done = TRUE;
aggstate->agg_done = true;
return NULL;
}
}
@ -4206,12 +4206,12 @@ AggGetTempMemoryContext(FunctionCallInfo fcinfo)
* AggStateIsShared - find out whether transition state is shared
*
* If the function is being called as an aggregate support function,
* return TRUE if the aggregate's transition state is shared across
* multiple aggregates, FALSE if it is not.
* return true if the aggregate's transition state is shared across
* multiple aggregates, false if it is not.
*
* Returns TRUE if not called as an aggregate support function.
* Returns true if not called as an aggregate support function.
* This is intended as a conservative answer, ie "no you'd better not
* scribble on your input". In particular, will return TRUE if the
* scribble on your input". In particular, will return true if the
* aggregate is being used as a window function, which is a scenario
* in which changing the transition state is a bad idea. We might
* want to refine the behavior for the window case in future.

View File

@ -88,10 +88,10 @@ exec_append_initialize_next(AppendState *appendstate)
/*
* if scanning in reverse, we start at the last scan in the list and
* then proceed back to the first.. in any case we inform ExecAppend
* that we are at the end of the line by returning FALSE
* that we are at the end of the line by returning false
*/
appendstate->as_whichplan = 0;
return FALSE;
return false;
}
else if (whichplan >= appendstate->as_nplans)
{
@ -99,11 +99,11 @@ exec_append_initialize_next(AppendState *appendstate)
* as above, end the scan if we go beyond the last scan in our list..
*/
appendstate->as_whichplan = appendstate->as_nplans - 1;
return FALSE;
return false;
}
else
{
return TRUE;
return true;
}
}

View File

@ -73,7 +73,7 @@ ExecGroup(PlanState *pstate)
if (TupIsNull(outerslot))
{
/* empty input, so return nothing */
node->grp_done = TRUE;
node->grp_done = true;
return NULL;
}
/* Copy tuple into firsttupleslot */
@ -116,7 +116,7 @@ ExecGroup(PlanState *pstate)
if (TupIsNull(outerslot))
{
/* no more groups, so we're done */
node->grp_done = TRUE;
node->grp_done = true;
return NULL;
}
@ -177,7 +177,7 @@ ExecInitGroup(Group *node, EState *estate, int eflags)
grpstate->ss.ps.plan = (Plan *) node;
grpstate->ss.ps.state = estate;
grpstate->ss.ps.ExecProcNode = ExecGroup;
grpstate->grp_done = FALSE;
grpstate->grp_done = false;
/*
* create expression context
@ -246,7 +246,7 @@ ExecReScanGroup(GroupState *node)
{
PlanState *outerPlan = outerPlanState(node);
node->grp_done = FALSE;
node->grp_done = false;
/* must clear first tuple */
ExecClearTuple(node->ss.ss_ScanTupleSlot);

View File

@ -918,10 +918,10 @@ ExecHashTableInsert(HashJoinTable hashtable,
* econtext->ecxt_innertuple. Vars in the hashkeys expressions should have
* varno either OUTER_VAR or INNER_VAR.
*
* A TRUE result means the tuple's hash value has been successfully computed
* and stored at *hashvalue. A FALSE result means the tuple cannot match
* A true result means the tuple's hash value has been successfully computed
* and stored at *hashvalue. A false result means the tuple cannot match
* because it contains a null attribute, and hence it should be discarded
* immediately. (If keep_nulls is true then FALSE is never returned.)
* immediately. (If keep_nulls is true then false is never returned.)
*/
bool
ExecHashGetHashValue(HashJoinTable hashtable,

View File

@ -676,8 +676,8 @@ ExecIndexEvalRuntimeKeys(ExprContext *econtext,
* ExecIndexEvalArrayKeys
* Evaluate any array key values, and set up to iterate through arrays.
*
* Returns TRUE if there are array elements to consider; FALSE means there
* is at least one null or empty array, so no match is possible. On TRUE
* Returns true if there are array elements to consider; false means there
* is at least one null or empty array, so no match is possible. On true
* result, the scankeys are initialized with the first elements of the arrays.
*/
bool
@ -756,8 +756,8 @@ ExecIndexEvalArrayKeys(ExprContext *econtext,
* ExecIndexAdvanceArrayKeys
* Advance to the next set of array key values, if any.
*
* Returns TRUE if there is another set of values to consider, FALSE if not.
* On TRUE result, the scankeys are initialized with the next set of values.
* Returns true if there is another set of values to consider, false if not.
* On true result, the scankeys are initialized with the next set of values.
*/
bool
ExecIndexAdvanceArrayKeys(IndexArrayKeyInfo *arrayKeys, int numArrayKeys)

View File

@ -510,7 +510,7 @@ MJFillInner(MergeJoinState *node)
/*
* Check that a qual condition is constant true or constant false.
* If it is constant false (or null), set *is_const_false to TRUE.
* If it is constant false (or null), set *is_const_false to true.
*
* Constant true would normally be represented by a NIL list, but we allow an
* actual bool Const as well. We do expect that the planner will have thrown

View File

@ -220,7 +220,7 @@ ExecScanSubPlan(SubPlanState *node,
MemoryContext oldcontext;
TupleTableSlot *slot;
Datum result;
bool found = false; /* TRUE if got at least one subplan tuple */
bool found = false; /* true if got at least one subplan tuple */
ListCell *pvar;
ListCell *l;
ArrayBuildStateAny *astate = NULL;

View File

@ -1907,9 +1907,9 @@ _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan)
* snapshot: query snapshot to use, or InvalidSnapshot for the normal
* behavior of taking a new snapshot for each query.
* crosscheck_snapshot: for RI use, all others pass InvalidSnapshot
* read_only: TRUE for read-only execution (no CommandCounterIncrement)
* fire_triggers: TRUE to fire AFTER triggers at end of query (normal case);
* FALSE means any AFTER triggers are postponed to end of outer query
* read_only: true for read-only execution (no CommandCounterIncrement)
* fire_triggers: true to fire AFTER triggers at end of query (normal case);
* false means any AFTER triggers are postponed to end of outer query
* tcount: execution tuple-count limit, or 0 for none
*/
static int

View File

@ -48,7 +48,7 @@ struct TupleQueueReader
/*
* Receive a tuple from a query, and send it to the designated shm_mq.
*
* Returns TRUE if successful, FALSE if shm_mq has been detached.
* Returns true if successful, false if shm_mq has been detached.
*/
static bool
tqueueReceiveSlot(TupleTableSlot *slot, DestReceiver *self)