diff options
| author | Peter Eisentraut | 2017-08-16 04:22:32 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-11-08 16:37:28 +0000 |
| commit | 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch) | |
| tree | b46993cceb7cd8b848e39a45c1bb8c73dc67b221 /src/backend/optimizer | |
| parent | 4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff) | |
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>
Diffstat (limited to 'src/backend/optimizer')
| -rw-r--r-- | src/backend/optimizer/path/allpaths.c | 6 | ||||
| -rw-r--r-- | src/backend/optimizer/path/equivclass.c | 10 | ||||
| -rw-r--r-- | src/backend/optimizer/path/indxpath.c | 8 | ||||
| -rw-r--r-- | src/backend/optimizer/path/joinpath.c | 4 | ||||
| -rw-r--r-- | src/backend/optimizer/path/joinrels.c | 4 | ||||
| -rw-r--r-- | src/backend/optimizer/path/pathkeys.c | 8 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/analyzejoins.c | 4 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/createplan.c | 4 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/initsplan.c | 20 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/planagg.c | 8 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/planner.c | 4 | ||||
| -rw-r--r-- | src/backend/optimizer/plan/subselect.c | 2 | ||||
| -rw-r--r-- | src/backend/optimizer/prep/prepjointree.c | 14 | ||||
| -rw-r--r-- | src/backend/optimizer/util/clauses.c | 18 | ||||
| -rw-r--r-- | src/backend/optimizer/util/placeholder.c | 2 | ||||
| -rw-r--r-- | src/backend/optimizer/util/predtest.c | 32 | ||||
| -rw-r--r-- | src/backend/optimizer/util/var.c | 4 |
17 files changed, 76 insertions, 76 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index a6efb4e1d39..906d08ab373 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -1884,7 +1884,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, * Zero out result area for subquery_is_pushdown_safe, so that it can set * flags as needed while recursing. In particular, we need a workspace * for keeping track of unsafe-to-reference columns. unsafeColumns[i] - * will be set TRUE if we find that output column i of the subquery is + * will be set true if we find that output column i of the subquery is * unsafe to use in a pushed-down qual. */ memset(&safetyInfo, 0, sizeof(safetyInfo)); @@ -2566,7 +2566,7 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels) * In addition, we make several checks on the subquery's output columns to see * if it is safe to reference them in pushed-down quals. If output column k * is found to be unsafe to reference, we set safetyInfo->unsafeColumns[k] - * to TRUE, but we don't reject the subquery overall since column k might not + * to true, but we don't reject the subquery overall since column k might not * be referenced by some/all quals. The unsafeColumns[] array will be * consulted later by qual_is_pushdown_safe(). It's better to do it this way * than to make the checks directly in qual_is_pushdown_safe(), because when @@ -2688,7 +2688,7 @@ recurse_pushdown_safe(Node *setOp, Query *topquery, * * There are several cases in which it's unsafe to push down an upper-level * qual if it references a particular output column of a subquery. We check - * each output column of the subquery and set unsafeColumns[k] to TRUE if + * each output column of the subquery and set unsafeColumns[k] to true if * that column is unsafe for a pushed-down qual to reference. The conditions * checked here are: * diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index a225414c970..45a6889b8b8 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -72,7 +72,7 @@ static bool reconsider_full_join_clause(PlannerInfo *root, * any delay by an outer join, so its two sides can be considered equal * anywhere they are both computable; moreover that equality can be * extended transitively. Record this knowledge in the EquivalenceClass - * data structure, if applicable. Returns TRUE if successful, FALSE if not + * data structure, if applicable. Returns true if successful, false if not * (in which case caller should treat the clause as ordinary, not an * equivalence). * @@ -602,8 +602,8 @@ add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids, * so for now we live with just reporting the first match. See also * generate_implied_equalities_for_column and match_pathkeys_to_index.) * - * If create_it is TRUE, we'll build a new EquivalenceClass when there is no - * match. If create_it is FALSE, we just return NULL when no match. + * If create_it is true, we'll build a new EquivalenceClass when there is no + * match. If create_it is false, we just return NULL when no match. * * This can be used safely both before and after EquivalenceClass merging; * since it never causes merging it does not invalidate any existing ECs @@ -1675,7 +1675,7 @@ reconsider_outer_join_clauses(PlannerInfo *root) /* * reconsider_outer_join_clauses for a single LEFT/RIGHT JOIN clause * - * Returns TRUE if we were able to propagate a constant through the clause. + * Returns true if we were able to propagate a constant through the clause. */ static bool reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, @@ -1800,7 +1800,7 @@ reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, /* * reconsider_outer_join_clauses for a single FULL JOIN clause * - * Returns TRUE if we were able to propagate a constant through the clause. + * Returns true if we were able to propagate a constant through the clause. */ static bool reconsider_full_join_clause(PlannerInfo *root, RestrictInfo *rinfo) diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index f35380391ad..18f6bafcdde 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -838,12 +838,12 @@ get_index_paths(PlannerInfo *root, RelOptInfo *rel, * * If skip_nonnative_saop is non-NULL, we ignore ScalarArrayOpExpr clauses * unless the index AM supports them directly, and we set *skip_nonnative_saop - * to TRUE if we found any such clauses (caller must initialize the variable - * to FALSE). If it's NULL, we do not ignore ScalarArrayOpExpr clauses. + * to true if we found any such clauses (caller must initialize the variable + * to false). If it's NULL, we do not ignore ScalarArrayOpExpr clauses. * * If skip_lower_saop is non-NULL, we ignore ScalarArrayOpExpr clauses for - * non-first index columns, and we set *skip_lower_saop to TRUE if we found - * any such clauses (caller must initialize the variable to FALSE). If it's + * non-first index columns, and we set *skip_lower_saop to true if we found + * any such clauses (caller must initialize the variable to false). If it's * NULL, we do not ignore non-first ScalarArrayOpExpr clauses, but they will * result in considering the scan's output to be unordered. * diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 310262d87c0..02a630278f7 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -336,7 +336,7 @@ add_paths_to_joinrel(PlannerInfo *root, * across joins unless there's a join-order-constraint-based reason to do so. * So we ignore the param_source_rels restriction when this case applies. * - * allow_star_schema_join() returns TRUE if the param_source_rels restriction + * allow_star_schema_join() returns true if the param_source_rels restriction * should be overridden, ie, it's okay to perform this join. */ static inline bool @@ -1880,7 +1880,7 @@ hash_inner_and_outer(PlannerInfo *root, * Select mergejoin clauses that are usable for a particular join. * Returns a list of RestrictInfo nodes for those clauses. * - * *mergejoin_allowed is normally set to TRUE, but it is set to FALSE if + * *mergejoin_allowed is normally set to true, but it is set to false if * this is a right/full join and there are nonmergejoinable join clauses. * The executor's mergejoin machinery cannot handle such cases, so we have * to avoid generating a mergejoin plan. (Note that this flag does NOT diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index 2b868c52de4..244708ad5ac 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -335,7 +335,7 @@ make_rels_by_clauseless_joins(PlannerInfo *root, * * On success, *sjinfo_p is set to NULL if this is to be a plain inner join, * else it's set to point to the associated SpecialJoinInfo node. Also, - * *reversed_p is set TRUE if the given relations need to be swapped to + * *reversed_p is set true if the given relations need to be swapped to * match the SpecialJoinInfo node. */ static bool @@ -1250,7 +1250,7 @@ mark_dummy_rel(RelOptInfo *rel) * decide there's no match for an outer row, which is pretty stupid. So, * we need to detect the case. * - * If only_pushed_down is TRUE, then consider only pushed-down quals. + * If only_pushed_down is true, then consider only pushed-down quals. */ static bool restriction_is_constant_false(List *restrictlist, bool only_pushed_down) diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c index 9d83a5ca62b..c6870d314e7 100644 --- a/src/backend/optimizer/path/pathkeys.c +++ b/src/backend/optimizer/path/pathkeys.c @@ -162,8 +162,8 @@ pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys) * considered. Otherwise child members are ignored. (See the comments for * get_eclass_for_sort_expr.) * - * create_it is TRUE if we should create any missing EquivalenceClass - * needed to represent the sort key. If it's FALSE, we return NULL if the + * create_it is true if we should create any missing EquivalenceClass + * needed to represent the sort key. If it's false, we return NULL if the * sort key isn't already present in any EquivalenceClass. */ static PathKey * @@ -987,8 +987,8 @@ update_mergeclause_eclasses(PlannerInfo *root, RestrictInfo *restrictinfo) * If successful, it returns a list of mergeclauses. * * 'pathkeys' is a pathkeys list showing the ordering of an input path. - * 'outer_keys' is TRUE if these keys are for the outer input path, - * FALSE if for inner. + * 'outer_keys' is true if these keys are for the outer input path, + * false if for inner. * 'restrictinfos' is a list of mergejoinable restriction clauses for the * join relation being formed. * diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c index 511603b5810..5b0da14748a 100644 --- a/src/backend/optimizer/plan/analyzejoins.c +++ b/src/backend/optimizer/plan/analyzejoins.c @@ -582,7 +582,7 @@ reduce_unique_semijoins(PlannerInfo *root) * Could the relation possibly be proven distinct on some set of columns? * * This is effectively a pre-checking function for rel_is_distinct_for(). - * It must return TRUE if rel_is_distinct_for() could possibly return TRUE + * It must return true if rel_is_distinct_for() could possibly return true * with this rel, but it should not expend a lot of cycles. The idea is * that callers can avoid doing possibly-expensive processing to compute * rel_is_distinct_for()'s argument lists if the call could not possibly @@ -735,7 +735,7 @@ rel_is_distinct_for(PlannerInfo *root, RelOptInfo *rel, List *clause_list) * on some set of output columns? * * This is effectively a pre-checking function for query_is_distinct_for(). - * It must return TRUE if query_is_distinct_for() could possibly return TRUE + * It must return true if query_is_distinct_for() could possibly return true * with this query, but it should not expend a lot of cycles. The idea is * that callers can avoid doing possibly-expensive processing to compute * query_is_distinct_for()'s argument lists if the call could not possibly diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 4b497486a0e..9c74e39bd34 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -5537,7 +5537,7 @@ make_sort(Plan *lefttree, int numCols, * 'pathkeys' is the list of pathkeys by which the result is to be sorted * 'relids' identifies the child relation being sorted, if any * 'reqColIdx' is NULL or an array of required sort key column numbers - * 'adjust_tlist_in_place' is TRUE if lefttree must be modified in-place + * 'adjust_tlist_in_place' is true if lefttree must be modified in-place * * We must convert the pathkey information into arrays of sort key column * numbers, sort operator OIDs, collation OIDs, and nulls-first flags, @@ -5558,7 +5558,7 @@ make_sort(Plan *lefttree, int numCols, * compute these expressions, since a Sort or MergeAppend node itself won't * do any such calculations. If the input plan type isn't one that can do * projections, this means adding a Result node just to do the projection. - * However, the caller can pass adjust_tlist_in_place = TRUE to force the + * However, the caller can pass adjust_tlist_in_place = true to force the * lefttree tlist to be modified in-place regardless of whether the node type * can project --- we use this for fixing the tlist of MergeAppend itself. * diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 974eb58d837..448cb734672 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -740,7 +740,7 @@ deconstruct_jointree(PlannerInfo *root) * * Inputs: * jtnode is the jointree node to examine - * below_outer_join is TRUE if this node is within the nullable side of a + * below_outer_join is true if this node is within the nullable side of a * higher-level outer join * Outputs: * *qualscope gets the set of base Relids syntactically included in this @@ -1609,8 +1609,8 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * as belonging to a higher join level, just add it to postponed_qual_list. * * 'clause': the qual clause to be distributed - * 'is_deduced': TRUE if the qual came from implied-equality deduction - * 'below_outer_join': TRUE if the qual is from a JOIN/ON that is below the + * 'is_deduced': true if the qual came from implied-equality deduction + * 'below_outer_join': true if the qual is from a JOIN/ON that is below the * nullable side of a higher-level outer join * 'jointype': type of join the qual is from (JOIN_INNER for a WHERE clause) * 'security_level': security_level to assign to the qual @@ -1621,7 +1621,7 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * baserels appearing on the outer (nonnullable) side of the join * (for FULL JOIN this includes both sides of the join, and must in fact * equal qualscope) - * 'deduced_nullable_relids': if is_deduced is TRUE, the nullable relids to + * 'deduced_nullable_relids': if is_deduced is true, the nullable relids to * impute to the clause; otherwise NULL * 'postponed_qual_list': list of PostponedQual structs, which we can add * this qual to if it turns out to belong to a higher join level. @@ -1631,9 +1631,9 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * 'ojscope' is needed if we decide to force the qual up to the outer-join * level, which will be ojscope not necessarily qualscope. * - * In normal use (when is_deduced is FALSE), at the time this is called, + * In normal use (when is_deduced is false), at the time this is called, * root->join_info_list must contain entries for all and only those special - * joins that are syntactically below this qual. But when is_deduced is TRUE, + * joins that are syntactically below this qual. But when is_deduced is true, * we are adding new deduced clauses after completion of deconstruct_jointree, * so it cannot be assumed that root->join_info_list has anything to do with * qual placement. @@ -2023,8 +2023,8 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, * may force extra delay of higher-level outer joins. * * If the qual must be delayed, add relids to *relids_p to reflect the lowest - * safe level for evaluating the qual, and return TRUE. Any extra delay for - * higher-level joins is reflected by setting delay_upper_joins to TRUE in + * safe level for evaluating the qual, and return true. Any extra delay for + * higher-level joins is reflected by setting delay_upper_joins to true in * SpecialJoinInfo structs. We also compute nullable_relids, the set of * referenced relids that are nullable by lower outer joins (note that this * can be nonempty even for a non-delayed qual). @@ -2056,7 +2056,7 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, * Lastly, a pushed-down qual that references the nullable side of any current * join_info_list member and has to be evaluated above that OJ (because its * required relids overlap the LHS too) causes that OJ's delay_upper_joins - * flag to be set TRUE. This will prevent any higher-level OJs from + * flag to be set true. This will prevent any higher-level OJs from * being interchanged with that OJ, which would result in not having any * correct place to evaluate the qual. (The case we care about here is a * sub-select WHERE clause within the RHS of some outer join. The WHERE @@ -2140,7 +2140,7 @@ check_outerjoin_delay(PlannerInfo *root, /* * check_equivalence_delay * Detect whether a potential equivalence clause is rendered unsafe - * by outer-join-delay considerations. Return TRUE if it's safe. + * by outer-join-delay considerations. Return true if it's safe. * * The initial tests in distribute_qual_to_rels will consider a mergejoinable * clause to be a potential equivalence clause if it is not outerjoin_delayed. diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index bba8a1ff587..889e8af33bf 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -232,9 +232,9 @@ preprocess_minmax_aggregates(PlannerInfo *root, List *tlist) * that each one is a MIN/MAX aggregate. If so, build a list of the * distinct aggregate calls in the tree. * - * Returns TRUE if a non-MIN/MAX aggregate is found, FALSE otherwise. + * Returns true if a non-MIN/MAX aggregate is found, false otherwise. * (This seemingly-backward definition is used because expression_tree_walker - * aborts the scan on TRUE return, which is what we want.) + * aborts the scan on true return, which is what we want.) * * Found aggregates are added to the list at *context; it's up to the caller * to initialize the list to NIL. @@ -335,8 +335,8 @@ find_minmax_aggs_walker(Node *node, List **context) * Given a MIN/MAX aggregate, try to build an indexscan Path it can be * optimized with. * - * If successful, stash the best path in *mminfo and return TRUE. - * Otherwise, return FALSE. + * If successful, stash the best path in *mminfo and return true. + * Otherwise, return false. */ static bool build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo, diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index d58635c887c..9b7a8fd82c4 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -5688,7 +5688,7 @@ make_pathkeys_for_window(PlannerInfo *root, WindowClause *wc, * below the Sort step (and the Distinct step, if any). This will be * exactly final_target if we decide a projection step wouldn't be helpful. * - * In addition, *have_postponed_srfs is set to TRUE if we choose to postpone + * In addition, *have_postponed_srfs is set to true if we choose to postpone * any set-returning functions to after the Sort. */ static PathTarget * @@ -6040,7 +6040,7 @@ expression_planner(Expr *expr) * tableOid is the OID of a table to be clustered on its index indexOid * (which is already known to be a btree index). Decide whether it's * cheaper to do an indexscan or a seqscan-plus-sort to execute the CLUSTER. - * Return TRUE to use sorting, FALSE to use an indexscan. + * Return true to use sorting, false to use an indexscan. * * Note: caller had better already hold some type of lock on the table. */ diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 1103984779b..8f75fa98edc 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -1563,7 +1563,7 @@ convert_EXISTS_sublink_to_join(PlannerInfo *root, SubLink *sublink, * won't occur, nor will other side-effects of volatile functions. This seems * unlikely to bother anyone in practice. * - * Returns TRUE if was able to discard the targetlist, else FALSE. + * Returns true if was able to discard the targetlist, else false. */ static bool simplify_EXISTS_query(PlannerInfo *root, Query *query) diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index f3bb73a664b..1d7e4994f50 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -644,9 +644,9 @@ pull_up_subqueries(PlannerInfo *root) * This forces use of the PlaceHolderVar mechanism for all non-Var targetlist * items, and puts some additional restrictions on what can be pulled up. * - * deletion_ok is TRUE if the caller can cope with us returning NULL for a + * deletion_ok is true if the caller can cope with us returning NULL for a * deletable leaf node (for example, a VALUES RTE that could be pulled up). - * If it's FALSE, we'll avoid pullup in such cases. + * If it's false, we'll avoid pullup in such cases. * * A tricky aspect of this code is that if we pull up a subquery we have * to replace Vars that reference the subquery's outputs throughout the @@ -1401,7 +1401,7 @@ make_setop_translation_list(Query *query, Index newvarno, * (Note subquery is not necessarily equal to rte->subquery; it could be a * processed copy of that.) * lowest_outer_join is the lowest outer join above the subquery, or NULL. - * deletion_ok is TRUE if it'd be okay to delete the subquery entirely. + * deletion_ok is true if it'd be okay to delete the subquery entirely. */ static bool is_simple_subquery(Query *subquery, RangeTblEntry *rte, @@ -1457,7 +1457,7 @@ is_simple_subquery(Query *subquery, RangeTblEntry *rte, /* * Don't pull up a subquery with an empty jointree, unless it has no quals - * and deletion_ok is TRUE and we're not underneath an outer join. + * and deletion_ok is true and we're not underneath an outer join. * * query_planner() will correctly generate a Result plan for a jointree * that's totally empty, but we can't cope with an empty FromExpr @@ -1681,7 +1681,7 @@ pull_up_simple_values(PlannerInfo *root, Node *jtnode, RangeTblEntry *rte) * to pull up into the parent query. * * rte is the RTE_VALUES RangeTblEntry to check. - * deletion_ok is TRUE if it'd be okay to delete the VALUES RTE entirely. + * deletion_ok is true if it'd be okay to delete the VALUES RTE entirely. */ static bool is_simple_values(PlannerInfo *root, RangeTblEntry *rte, bool deletion_ok) @@ -1689,7 +1689,7 @@ is_simple_values(PlannerInfo *root, RangeTblEntry *rte, bool deletion_ok) Assert(rte->rtekind == RTE_VALUES); /* - * We can only pull up a VALUES RTE if deletion_ok is TRUE. It's + * We can only pull up a VALUES RTE if deletion_ok is true. It's * basically the same case as a sub-select with empty FROM list; see * comments in is_simple_subquery(). */ @@ -1844,7 +1844,7 @@ is_safe_append_member(Query *subquery) * * If restricted is false, all level-1 Vars are allowed (but we still must * search the jointree, since it might contain outer joins below which there - * will be restrictions). If restricted is true, return TRUE when any qual + * will be restrictions). If restricted is true, return true when any qual * in the jointree contains level-1 Vars coming from outside the rels listed * in safe_upper_varnos. */ diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 652843a146f..30cdd3da4c5 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -832,7 +832,7 @@ expression_returns_set_rows(Node *clause) * contain_subplans * Recursively search for subplan nodes within a clause. * - * If we see a SubLink node, we will return TRUE. This is only possible if + * If we see a SubLink node, we will return true. This is only possible if * the expression tree hasn't yet been transformed by subselect.c. We do not * know whether the node will produce a true subplan or just an initplan, * but we make the conservative assumption that it will be a subplan. @@ -1626,8 +1626,8 @@ contain_leaked_vars_walker(Node *node, void *context) * that either v1 or v2 can't be NULL, but it does prove that the t1 row * as a whole can't be all-NULL. * - * top_level is TRUE while scanning top-level AND/OR structure; here, showing - * the result is either FALSE or NULL is good enough. top_level is FALSE when + * top_level is true while scanning top-level AND/OR structure; here, showing + * the result is either FALSE or NULL is good enough. top_level is false when * we have descended below a NOT or a strict function: now we must be able to * prove that the subexpression goes to NULL. * @@ -1834,8 +1834,8 @@ find_nonnullable_rels_walker(Node *node, bool top_level) * The result is a palloc'd List, but we have not copied the member Var nodes. * Also, we don't bother trying to eliminate duplicate entries. * - * top_level is TRUE while scanning top-level AND/OR structure; here, showing - * the result is either FALSE or NULL is good enough. top_level is FALSE when + * top_level is true while scanning top-level AND/OR structure; here, showing + * the result is either FALSE or NULL is good enough. top_level is false when * we have descended below a NOT or a strict function: now we must be able to * prove that the subexpression goes to NULL. * @@ -3620,8 +3620,8 @@ eval_const_expressions_mutator(Node *node, * input is TRUE and at least one is NULL. We don't actually include the NULL * here, that's supposed to be done by the caller. * - * The output arguments *haveNull and *forceTrue must be initialized FALSE - * by the caller. They will be set TRUE if a null constant or true constant, + * The output arguments *haveNull and *forceTrue must be initialized false + * by the caller. They will be set true if a NULL constant or TRUE constant, * respectively, is detected anywhere in the argument list. */ static List * @@ -3732,8 +3732,8 @@ simplify_or_arguments(List *args, * no input is FALSE and at least one is NULL. We don't actually include the * NULL here, that's supposed to be done by the caller. * - * The output arguments *haveNull and *forceFalse must be initialized FALSE - * by the caller. They will be set TRUE if a null constant or false constant, + * The output arguments *haveNull and *forceFalse must be initialized false + * by the caller. They will be set true if a null constant or false constant, * respectively, is detected anywhere in the argument list. */ static List * diff --git a/src/backend/optimizer/util/placeholder.c b/src/backend/optimizer/util/placeholder.c index 3343521b971..864b2796ccc 100644 --- a/src/backend/optimizer/util/placeholder.c +++ b/src/backend/optimizer/util/placeholder.c @@ -63,7 +63,7 @@ make_placeholder_expr(PlannerInfo *root, Expr *expr, Relids phrels) * simplified query passed to query_planner(). * * Note: this should only be called after query_planner() has started. Also, - * create_new_ph must not be TRUE after deconstruct_jointree begins, because + * create_new_ph must not be true after deconstruct_jointree begins, because * make_outerjoininfo assumes that we already know about all placeholders. */ PlaceHolderInfo * diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index 536d24b698c..134460cc13f 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -1048,7 +1048,7 @@ arrayexpr_cleanup_fn(PredIterInfo info) * Does the predicate implication test for a "simple clause" predicate * and a "simple clause" restriction. * - * We return TRUE if able to prove the implication, FALSE if not. + * We return true if able to prove the implication, false if not. * * We have three strategies for determining whether one simple clause * implies another: @@ -1116,7 +1116,7 @@ predicate_implied_by_simple_clause(Expr *predicate, Node *clause, * Does the predicate refutation test for a "simple clause" predicate * and a "simple clause" restriction. * - * We return TRUE if able to prove the refutation, FALSE if not. + * We return true if able to prove the refutation, false if not. * * Unlike the implication case, checking for equal() clauses isn't * helpful. @@ -1360,12 +1360,12 @@ static const bool BT_implies_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {TRUE, TRUE, none, none, none, TRUE}, /* LT */ - {none, TRUE, none, none, none, none}, /* LE */ - {none, TRUE, TRUE, TRUE, none, none}, /* EQ */ - {none, none, none, TRUE, none, none}, /* GE */ - {none, none, none, TRUE, TRUE, TRUE}, /* GT */ - {none, none, none, none, none, TRUE} /* NE */ + {true, true, none, none, none, true}, /* LT */ + {none, true, none, none, none, none}, /* LE */ + {none, true, true, true, none, none}, /* EQ */ + {none, none, none, true, none, none}, /* GE */ + {none, none, none, true, true, true}, /* GT */ + {none, none, none, none, none, true} /* NE */ }; static const bool BT_refutes_table[6][6] = { @@ -1373,12 +1373,12 @@ static const bool BT_refutes_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {none, none, TRUE, TRUE, TRUE, none}, /* LT */ - {none, none, none, none, TRUE, none}, /* LE */ - {TRUE, none, none, none, TRUE, TRUE}, /* EQ */ - {TRUE, none, none, none, none, none}, /* GE */ - {TRUE, TRUE, TRUE, none, none, none}, /* GT */ - {none, none, TRUE, none, none, none} /* NE */ + {none, none, true, true, true, none}, /* LT */ + {none, none, none, none, true, none}, /* LE */ + {true, none, none, none, true, true}, /* EQ */ + {true, none, none, none, none, none}, /* GE */ + {true, true, true, none, none, none}, /* GT */ + {none, none, true, none, none, none} /* NE */ }; static const StrategyNumber BT_implic_table[6][6] = { @@ -1417,7 +1417,7 @@ static const StrategyNumber BT_refute_table[6][6] = { * When refute_it == false, we want to prove the predicate true; * when refute_it == true, we want to prove the predicate false. * (There is enough common code to justify handling these two cases - * in one routine.) We return TRUE if able to make the proof, FALSE + * in one routine.) We return true if able to make the proof, false * if not able to prove it. * * We can make proofs involving several expression forms (here "foo" and "bar" @@ -1661,7 +1661,7 @@ operator_predicate_proof(Expr *predicate, Node *clause, bool refute_it) * Assuming that EXPR1 clause_op EXPR2 is true, try to prove or refute * EXPR1 pred_op EXPR2. * - * Return TRUE if able to make the proof, false if not able to prove it. + * Return true if able to make the proof, false if not able to prove it. */ static bool operator_same_subexprs_proof(Oid pred_op, Oid clause_op, bool refute_it) diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index b8d7d3ffadc..81c60dce5ed 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -657,9 +657,9 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context) * entries might now be arbitrary expressions, not just Vars. This affects * this function in one important way: we might find ourselves inserting * SubLink expressions into subqueries, and we must make sure that their - * Query.hasSubLinks fields get set to TRUE if so. If there are any + * Query.hasSubLinks fields get set to true if so. If there are any * SubLinks in the join alias lists, the outer Query should already have - * hasSubLinks = TRUE, so this is only relevant to un-flattened subqueries. + * hasSubLinks = true, so this is only relevant to un-flattened subqueries. * * NOTE: this is used on not-yet-planned expressions. We do not expect it * to be applied directly to the whole Query, so if we see a Query to start |
