aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r--src/backend/parser/parse_clause.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index aa704bb4412..fcee1379c0c 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -149,7 +149,7 @@ transformFromClause(ParseState *pstate, List *frmList)
*
* If alsoSource is true, add the target to the query's joinlist and
* namespace. For INSERT, we don't want the target to be joined to;
- * it's a destination of tuples, not a source. For UPDATE/DELETE,
+ * it's a destination of tuples, not a source. For UPDATE/DELETE,
* we do need to scan or join the target. (NOTE: we do not bother
* to check for namespace conflict; we assume that the namespace was
* initially empty in these cases.)
@@ -219,7 +219,7 @@ setTargetTable(ParseState *pstate, RangeVar *relation,
* Simplify InhOption (yes/no/default) into boolean yes/no.
*
* The reason we do things this way is that we don't want to examine the
- * SQL_inheritance option flag until parse_analyze() is run. Otherwise,
+ * SQL_inheritance option flag until parse_analyze() is run. Otherwise,
* we'd do the wrong thing with query strings that intermix SET commands
* with queries.
*/
@@ -396,7 +396,7 @@ transformJoinOnClause(ParseState *pstate, JoinExpr *j, List *namespace)
/*
* The namespace that the join expression should see is just the two
* subtrees of the JOIN plus any outer references from upper pstate
- * levels. Temporarily set this pstate's namespace accordingly. (We need
+ * levels. Temporarily set this pstate's namespace accordingly. (We need
* not check for refname conflicts, because transformFromClauseItem()
* already did.) All namespace items are marked visible regardless of
* LATERAL state.
@@ -490,7 +490,7 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r)
pstate->p_expr_kind = EXPR_KIND_NONE;
/*
- * Check that we got something reasonable. Many of these conditions are
+ * Check that we got something reasonable. Many of these conditions are
* impossible given restrictions of the grammar, but check 'em anyway.
*/
if (!IsA(query, Query) ||
@@ -526,7 +526,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
/*
* We make lateral_only names of this level visible, whether or not the
- * RangeFunction is explicitly marked LATERAL. This is needed for SQL
+ * RangeFunction is explicitly marked LATERAL. This is needed for SQL
* spec compliance in the case of UNNEST(), and seems useful on
* convenience grounds for all functions in FROM.
*
@@ -546,7 +546,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
* node types.
*
* We have to get this info now, because FigureColname only works on raw
- * parsetrees. Actually deciding what to do with the names is left up to
+ * parsetrees. Actually deciding what to do with the names is left up to
* addRangeTableEntryForFunction.
*
* Likewise, collect column definition lists if there were any. But
@@ -570,7 +570,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
* other ways of implementing the SQL-standard UNNEST() syntax.
*
* If there is any decoration (including a coldeflist), we don't
- * transform, which probably means a no-such-function error later. We
+ * transform, which probably means a no-such-function error later. We
* could alternatively throw an error right now, but that doesn't seem
* tremendously helpful. If someone is using any such decoration,
* then they're not using the SQL-standard syntax, and they're more
@@ -682,7 +682,7 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("WITH ORDINALITY cannot be used with a column definition list"),
- errhint("Put the column definition list inside ROWS FROM()."),
+ errhint("Put the column definition list inside ROWS FROM()."),
parser_errposition(pstate,
exprLocation((Node *) r->coldeflist))));
@@ -721,10 +721,10 @@ transformRangeFunction(ParseState *pstate, RangeFunction *r)
* (We could extract this from the function return node, but it saves cycles
* to pass it back separately.)
*
- * *top_rti: receives the rangetable index of top_rte. (Ditto.)
+ * *top_rti: receives the rangetable index of top_rte. (Ditto.)
*
* *namespace: receives a List of ParseNamespaceItems for the RTEs exposed
- * as table/column names by this item. (The lateral_only flags in these items
+ * as table/column names by this item. (The lateral_only flags in these items
* are indeterminate and should be explicitly set by the caller before use.)
*/
static Node *
@@ -837,7 +837,7 @@ transformFromClauseItem(ParseState *pstate, Node *n,
* right side, by temporarily adding them to the pstate's namespace
* list. Per SQL:2008, if the join type is not INNER or LEFT then the
* left-side names must still be exposed, but it's an error to
- * reference them. (Stupid design, but that's what it says.) Hence,
+ * reference them. (Stupid design, but that's what it says.) Hence,
* we always push them into the namespace, but mark them as not
* lateral_ok if the jointype is wrong.
*
@@ -1101,7 +1101,7 @@ transformFromClauseItem(ParseState *pstate, Node *n,
*
* Note: if there are nested alias-less JOINs, the lower-level ones
* will remain in the list although they have neither p_rel_visible
- * nor p_cols_visible set. We could delete such list items, but it's
+ * nor p_cols_visible set. We could delete such list items, but it's
* unclear that it's worth expending cycles to do so.
*/
if (j->alias != NULL)
@@ -1438,9 +1438,9 @@ checkTargetlistEntrySQL92(ParseState *pstate, TargetEntry *tle,
*
* This function supports the old SQL92 ORDER BY interpretation, where the
* expression is an output column name or number. If we fail to find a
- * match of that sort, we fall through to the SQL99 rules. For historical
+ * match of that sort, we fall through to the SQL99 rules. For historical
* reasons, Postgres also allows this interpretation for GROUP BY, though
- * the standard never did. However, for GROUP BY we prefer a SQL99 match.
+ * the standard never did. However, for GROUP BY we prefer a SQL99 match.
* This function is *not* used for WINDOW definitions.
*
* node the ORDER BY, GROUP BY, or DISTINCT ON expression to be matched
@@ -1458,7 +1458,7 @@ findTargetlistEntrySQL92(ParseState *pstate, Node *node, List **tlist,
*
* 1. Bare ColumnName (no qualifier or subscripts)
* For a bare identifier, we search for a matching column name
- * in the existing target list. Multiple matches are an error
+ * in the existing target list. Multiple matches are an error
* unless they refer to identical values; for example,
* we allow SELECT a, a FROM table ORDER BY a
* but not SELECT a AS b, b FROM table ORDER BY b
@@ -1467,7 +1467,7 @@ findTargetlistEntrySQL92(ParseState *pstate, Node *node, List **tlist,
* For GROUP BY, it is incorrect to match the grouping item against
* targetlist entries: according to SQL92, an identifier in GROUP BY
* is a reference to a column name exposed by FROM, not to a target
- * list column. However, many implementations (including pre-7.0
+ * list column. However, many implementations (including pre-7.0
* PostgreSQL) accept this anyway. So for GROUP BY, we look first
* to see if the identifier matches any FROM column name, and only
* try for a targetlist name if it doesn't. This ensures that we
@@ -1625,7 +1625,7 @@ findTargetlistEntrySQL99(ParseState *pstate, Node *node, List **tlist,
/*
* Convert the untransformed node to a transformed expression, and search
* for a match in the tlist. NOTE: it doesn't really matter whether there
- * is more than one match. Also, we are willing to match an existing
+ * is more than one match. Also, we are willing to match an existing
* resjunk target here, though the SQL92 cases above must ignore resjunk
* targets.
*/
@@ -1653,7 +1653,7 @@ findTargetlistEntrySQL99(ParseState *pstate, Node *node, List **tlist,
/*
* If no matches, construct a new target entry which is appended to the
- * end of the target list. This target is given resjunk = TRUE so that it
+ * end of the target list. This target is given resjunk = TRUE so that it
* will not be projected into the final tuple.
*/
target_result = transformTargetEntry(pstate, node, expr, exprKind,
@@ -1864,7 +1864,7 @@ transformWindowDefinitions(ParseState *pstate,
* <window clause> syntax rule 10 and general rule 1. The frame
* clause rule is especially bizarre because it makes "OVER foo"
* different from "OVER (foo)", and requires the latter to throw an
- * error if foo has a nondefault frame clause. Well, ours not to
+ * error if foo has a nondefault frame clause. Well, ours not to
* reason why, but we do go out of our way to throw a useful error
* message for such cases.
*/
@@ -1967,7 +1967,7 @@ transformDistinctClause(ParseState *pstate,
/*
* The distinctClause should consist of all ORDER BY items followed by all
- * other non-resjunk targetlist items. There must not be any resjunk
+ * other non-resjunk targetlist items. There must not be any resjunk
* ORDER BY items --- that would imply that we are sorting by a value that
* isn't necessarily unique within a DISTINCT group, so the results
* wouldn't be well-defined. This construction ensures we follow the rule
@@ -2023,7 +2023,7 @@ transformDistinctClause(ParseState *pstate,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
is_agg ?
- errmsg("an aggregate with DISTINCT must have at least one argument") :
+ errmsg("an aggregate with DISTINCT must have at least one argument") :
errmsg("SELECT DISTINCT must have at least one column")));
return result;
@@ -2104,7 +2104,7 @@ transformDistinctOnClause(ParseState *pstate, List *distinctlist,
/*
* Now add any remaining DISTINCT ON items, using default sort/group
- * semantics for their data types. (Note: this is pretty questionable; if
+ * semantics for their data types. (Note: this is pretty questionable; if
* the ORDER BY list doesn't include all the DISTINCT ON items and more
* besides, you certainly aren't using DISTINCT ON in the intended way,
* and you probably aren't going to get consistent results. It might be
@@ -2131,7 +2131,8 @@ transformDistinctOnClause(ParseState *pstate, List *distinctlist,
}
/*
- * An empty result list is impossible here because of grammar restrictions.
+ * An empty result list is impossible here because of grammar
+ * restrictions.
*/
Assert(result != NIL);