diff options
Diffstat (limited to 'src/backend/parser/parse_coerce.c')
-rw-r--r-- | src/backend/parser/parse_coerce.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index bfd379323a5..c1bff328aa7 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -57,12 +57,12 @@ static bool typeIsOfTypedTable(Oid reltypeId, Oid reloftypeId); * Convert an expression to a target type and typmod. * * This is the general-purpose entry point for arbitrary type coercion - * operations. Direct use of the component operations can_coerce_type, + * operations. Direct use of the component operations can_coerce_type, * coerce_type, and coerce_type_typmod should be restricted to special * cases (eg, when the conversion is expected to succeed). * * Returns the possibly-transformed expression tree, or NULL if the type - * conversion is not possible. (We do this, rather than ereport'ing directly, + * conversion is not possible. (We do this, rather than ereport'ing directly, * so that callers can generate custom error messages indicating context.) * * pstate - parse state (can be NULL, see coerce_type) @@ -146,7 +146,7 @@ coerce_to_target_type(ParseState *pstate, Node *expr, Oid exprtype, * already be properly coerced to the specified typmod. * * pstate is only used in the case that we are able to resolve the type of - * a previously UNKNOWN Param. It is okay to pass pstate = NULL if the + * a previously UNKNOWN Param. It is okay to pass pstate = NULL if the * caller does not want type information updated for Params. * * Note: this function must not modify the given expression tree, only add @@ -176,7 +176,7 @@ coerce_type(ParseState *pstate, Node *node, * * Note: by returning the unmodified node here, we are saying that * it's OK to treat an UNKNOWN constant as a valid input for a - * function accepting ANY, ANYELEMENT, or ANYNONARRAY. This should be + * function accepting ANY, ANYELEMENT, or ANYNONARRAY. This should be * all right, since an UNKNOWN value is still a perfectly valid Datum. * * NB: we do NOT want a RelabelType here: the exposed type of the @@ -193,7 +193,7 @@ coerce_type(ParseState *pstate, Node *node, * * These cases are unlike the ones above because the exposed type of * the argument must be an actual array or enum type. In particular - * the argument must *not* be an UNKNOWN constant. If it is, we just + * the argument must *not* be an UNKNOWN constant. If it is, we just * fall through; below, we'll call anyarray_in or anyenum_in, which * will produce an error. Also, if what we have is a domain over * array or enum, we have to relabel it to its base type. @@ -249,7 +249,7 @@ coerce_type(ParseState *pstate, Node *node, /* * If the target type is a domain, we want to call its base type's - * input routine, not domain_in(). This is to avoid premature failure + * input routine, not domain_in(). This is to avoid premature failure * when the domain applies a typmod: existing input routines follow * implicit-coercion semantics for length checks, which is not always * what we want here. The needed check will be applied properly @@ -262,7 +262,7 @@ coerce_type(ParseState *pstate, Node *node, * For most types we pass typmod -1 to the input routine, because * existing input routines follow implicit-coercion semantics for * length checks, which is not always what we want here. Any length - * constraint will be applied later by our caller. An exception + * constraint will be applied later by our caller. An exception * however is the INTERVAL type, for which we *must* pass the typmod * or it won't be able to obey the bizarre SQL-spec input rules. (Ugly * as sin, but so is this part of the spec...) @@ -342,7 +342,7 @@ coerce_type(ParseState *pstate, Node *node, { /* * If we have a COLLATE clause, we have to push the coercion - * underneath the COLLATE. This is really ugly, but there is little + * underneath the COLLATE. This is really ugly, but there is little * choice because the above hacks on Consts and Params wouldn't happen * otherwise. This kluge has consequences in coerce_to_target_type. */ @@ -365,7 +365,7 @@ coerce_type(ParseState *pstate, Node *node, { /* * Generate an expression tree representing run-time application - * of the conversion function. If we are dealing with a domain + * of the conversion function. If we are dealing with a domain * target type, the conversion function will yield the base type, * and we need to extract the correct typmod to use from the * domain's typtypmod. @@ -401,7 +401,7 @@ coerce_type(ParseState *pstate, Node *node, * to have the intended type when inspected by higher-level code. * * Also, domains may have value restrictions beyond the base type - * that must be accounted for. If the destination is a domain + * that must be accounted for. If the destination is a domain * then we won't need a RelabelType node. */ result = coerce_to_domain(node, InvalidOid, -1, targetTypeId, @@ -648,7 +648,7 @@ coerce_to_domain(Node *arg, Oid baseTypeId, int32 baseTypeMod, Oid typeId, } /* - * Now build the domain coercion node. This represents run-time checking + * Now build the domain coercion node. This represents run-time checking * of any constraints currently attached to the domain. This also ensures * that the expression is properly labeled as to result type. */ @@ -721,7 +721,7 @@ coerce_type_typmod(Node *node, Oid targetTypeId, int32 targetTypMod, * Mark a coercion node as IMPLICIT so it will never be displayed by * ruleutils.c. We use this when we generate a nest of coercion nodes * to implement what is logically one conversion; the inner nodes are - * forced to IMPLICIT_CAST format. This does not change their semantics, + * forced to IMPLICIT_CAST format. This does not change their semantics, * only display behavior. * * It is caller error to call this on something that doesn't have a @@ -1180,7 +1180,7 @@ select_common_type(ParseState *pstate, List *exprs, const char *context, } /* - * Nope, so set up for the full algorithm. Note that at this point, lc + * Nope, so set up for the full algorithm. Note that at this point, lc * points to the first list item with type different from pexpr's; we need * not re-examine any items the previous loop advanced over. */ @@ -1470,19 +1470,19 @@ check_generic_type_consistency(Oid *actual_arg_types, * is an extra restriction if not.) * * Domains over arrays match ANYARRAY arguments, and are immediately flattened - * to their base type. (In particular, if the return type is also ANYARRAY, + * to their base type. (In particular, if the return type is also ANYARRAY, * we'll set it to the base type not the domain type.) * * When allow_poly is false, we are not expecting any of the actual_arg_types * to be polymorphic, and we should not return a polymorphic result type - * either. When allow_poly is true, it is okay to have polymorphic "actual" + * either. When allow_poly is true, it is okay to have polymorphic "actual" * arg types, and we can return ANYARRAY or ANYELEMENT as the result. (This * case is currently used only to check compatibility of an aggregate's * declaration with the underlying transfn.) * * A special case is that we could see ANYARRAY as an actual_arg_type even * when allow_poly is false (this is possible only because pg_statistic has - * columns shown as anyarray in the catalogs). We allow this to match a + * columns shown as anyarray in the catalogs). We allow this to match a * declared ANYARRAY argument, but only if there is no ANYELEMENT argument * or result (since we can't determine a specific element type to match to * ANYELEMENT). Note this means that functions taking ANYARRAY had better @@ -1566,7 +1566,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, /* * Fast Track: if none of the arguments are polymorphic, return the - * unmodified rettype. We assume it can't be polymorphic either. + * unmodified rettype. We assume it can't be polymorphic either. */ if (!have_generics) return rettype; @@ -1831,8 +1831,8 @@ IsPreferredType(TYPCATEGORY category, Oid type) * Check if srctype is binary-coercible to targettype. * * This notion allows us to cheat and directly exchange values without - * going through the trouble of calling a conversion function. Note that - * in general, this should only be an implementation shortcut. Before 7.4, + * going through the trouble of calling a conversion function. Note that + * in general, this should only be an implementation shortcut. Before 7.4, * this was also used as a heuristic for resolving overloaded functions and * operators, but that's basically a bad idea. * @@ -1845,7 +1845,7 @@ IsPreferredType(TYPCATEGORY category, Oid type) * types. * * This function replaces IsBinaryCompatible(), which was an inherently - * symmetric test. Since the pg_cast entries aren't necessarily symmetric, + * symmetric test. Since the pg_cast entries aren't necessarily symmetric, * the order of the operands is now significant. */ bool @@ -2022,7 +2022,7 @@ find_coercion_pathway(Oid targetTypeId, Oid sourceTypeId, * Hack: disallow coercions to oidvector and int2vector, which * otherwise tend to capture coercions that should go to "real" array * types. We want those types to be considered "real" arrays for many - * purposes, but not this one. (Also, ArrayCoerceExpr isn't + * purposes, but not this one. (Also, ArrayCoerceExpr isn't * guaranteed to produce an output that meets the restrictions of * these datatypes, such as being 1-dimensional.) */ |