mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
@ -73,7 +73,7 @@
|
|||||||
* (two prefix colors plus a state number from the original NFA) an
|
* (two prefix colors plus a state number from the original NFA) an
|
||||||
* "enter key".
|
* "enter key".
|
||||||
*
|
*
|
||||||
* Each arc of the expanded graph is labelled with a trigram that must be
|
* Each arc of the expanded graph is labeled with a trigram that must be
|
||||||
* present in the string to match. We can construct this from an out-arc of
|
* present in the string to match. We can construct this from an out-arc of
|
||||||
* the underlying NFA state by combining the expanded state's prefix with the
|
* the underlying NFA state by combining the expanded state's prefix with the
|
||||||
* color label of the underlying out-arc, if neither prefix position is
|
* color label of the underlying out-arc, if neither prefix position is
|
||||||
@ -123,7 +123,7 @@
|
|||||||
* false positives that we would have to traverse a large fraction of the
|
* false positives that we would have to traverse a large fraction of the
|
||||||
* index, the graph is simplified further in a lossy fashion by removing
|
* index, the graph is simplified further in a lossy fashion by removing
|
||||||
* color trigrams. When a color trigram is removed, the states connected by
|
* color trigrams. When a color trigram is removed, the states connected by
|
||||||
* any arcs labelled with that trigram are merged.
|
* any arcs labeled with that trigram are merged.
|
||||||
*
|
*
|
||||||
* Trigrams do not all have equivalent value for searching: some of them are
|
* Trigrams do not all have equivalent value for searching: some of them are
|
||||||
* more frequent and some of them are less frequent. Ideally, we would like
|
* more frequent and some of them are less frequent. Ideally, we would like
|
||||||
|
@ -4238,7 +4238,7 @@ ExplainOpenGroup(const char *objtype, const char *labelname,
|
|||||||
/*
|
/*
|
||||||
* In YAML format, the grouping stack is an integer list. 0 means
|
* In YAML format, the grouping stack is an integer list. 0 means
|
||||||
* we've emitted nothing at this grouping level AND this grouping
|
* we've emitted nothing at this grouping level AND this grouping
|
||||||
* level is unlabelled and must be marked with "- ". See
|
* level is unlabeled and must be marked with "- ". See
|
||||||
* ExplainYAMLLineStarting().
|
* ExplainYAMLLineStarting().
|
||||||
*/
|
*/
|
||||||
ExplainYAMLLineStarting(es);
|
ExplainYAMLLineStarting(es);
|
||||||
@ -4601,7 +4601,7 @@ ExplainJSONLineEnding(ExplainState *es)
|
|||||||
*
|
*
|
||||||
* YAML lines are ordinarily indented by two spaces per indentation level.
|
* YAML lines are ordinarily indented by two spaces per indentation level.
|
||||||
* The text emitted for each property begins just prior to the preceding
|
* The text emitted for each property begins just prior to the preceding
|
||||||
* line-break, except for the first property in an unlabelled group, for which
|
* line-break, except for the first property in an unlabeled group, for which
|
||||||
* it begins immediately after the "- " that introduces the group. The first
|
* it begins immediately after the "- " that introduces the group. The first
|
||||||
* property of the group appears on the same line as the opening "- ".
|
* property of the group appears on the same line as the opening "- ".
|
||||||
*/
|
*/
|
||||||
|
@ -367,7 +367,7 @@ standard_planner(Query *parse, const char *query_string, int cursorOptions,
|
|||||||
* parallel-restricted, and in either case it should be OK to impose
|
* parallel-restricted, and in either case it should be OK to impose
|
||||||
* parallel-mode restrictions. If that ends up breaking something, then
|
* parallel-mode restrictions. If that ends up breaking something, then
|
||||||
* either some function the user included in the query is incorrectly
|
* either some function the user included in the query is incorrectly
|
||||||
* labelled as parallel-safe or parallel-restricted when in reality it's
|
* labeled as parallel-safe or parallel-restricted when in reality it's
|
||||||
* parallel-unsafe, or else the query planner itself has a bug.
|
* parallel-unsafe, or else the query planner itself has a bug.
|
||||||
*/
|
*/
|
||||||
glob->parallelModeNeeded = glob->parallelModeOK &&
|
glob->parallelModeNeeded = glob->parallelModeOK &&
|
||||||
|
@ -349,7 +349,7 @@ begin
|
|||||||
end loop flbl1;
|
end loop flbl1;
|
||||||
end;
|
end;
|
||||||
$$ language plpgsql;
|
$$ language plpgsql;
|
||||||
ERROR: end label "flbl1" specified for unlabelled block
|
ERROR: end label "flbl1" specified for unlabeled block
|
||||||
LINE 5: end loop flbl1;
|
LINE 5: end loop flbl1;
|
||||||
^
|
^
|
||||||
-- should fail: end label does not match start label
|
-- should fail: end label does not match start label
|
||||||
@ -374,7 +374,7 @@ begin
|
|||||||
end loop outer_label;
|
end loop outer_label;
|
||||||
end;
|
end;
|
||||||
$$ language plpgsql;
|
$$ language plpgsql;
|
||||||
ERROR: end label "outer_label" specified for unlabelled block
|
ERROR: end label "outer_label" specified for unlabeled block
|
||||||
LINE 6: end loop outer_label;
|
LINE 6: end loop outer_label;
|
||||||
^
|
^
|
||||||
-- unlabeled exit matches no blocks
|
-- unlabeled exit matches no blocks
|
||||||
|
@ -212,21 +212,21 @@ static HTAB *shared_cast_hash = NULL;
|
|||||||
{ \
|
{ \
|
||||||
if (estate->exitlabel == NULL) \
|
if (estate->exitlabel == NULL) \
|
||||||
{ \
|
{ \
|
||||||
/* unlabelled EXIT terminates this loop */ \
|
/* unlabeled EXIT terminates this loop */ \
|
||||||
rc = PLPGSQL_RC_OK; \
|
rc = PLPGSQL_RC_OK; \
|
||||||
exit_action; \
|
exit_action; \
|
||||||
} \
|
} \
|
||||||
else if ((looplabel) != NULL && \
|
else if ((looplabel) != NULL && \
|
||||||
strcmp(looplabel, estate->exitlabel) == 0) \
|
strcmp(looplabel, estate->exitlabel) == 0) \
|
||||||
{ \
|
{ \
|
||||||
/* labelled EXIT matching this loop, so terminate loop */ \
|
/* labeled EXIT matching this loop, so terminate loop */ \
|
||||||
estate->exitlabel = NULL; \
|
estate->exitlabel = NULL; \
|
||||||
rc = PLPGSQL_RC_OK; \
|
rc = PLPGSQL_RC_OK; \
|
||||||
exit_action; \
|
exit_action; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
/* non-matching labelled EXIT, propagate RC_EXIT out */ \
|
/* non-matching labeled EXIT, propagate RC_EXIT out */ \
|
||||||
exit_action; \
|
exit_action; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
@ -234,19 +234,19 @@ static HTAB *shared_cast_hash = NULL;
|
|||||||
{ \
|
{ \
|
||||||
if (estate->exitlabel == NULL) \
|
if (estate->exitlabel == NULL) \
|
||||||
{ \
|
{ \
|
||||||
/* unlabelled CONTINUE matches this loop, so continue in loop */ \
|
/* unlabeled CONTINUE matches this loop, so continue in loop */ \
|
||||||
rc = PLPGSQL_RC_OK; \
|
rc = PLPGSQL_RC_OK; \
|
||||||
} \
|
} \
|
||||||
else if ((looplabel) != NULL && \
|
else if ((looplabel) != NULL && \
|
||||||
strcmp(looplabel, estate->exitlabel) == 0) \
|
strcmp(looplabel, estate->exitlabel) == 0) \
|
||||||
{ \
|
{ \
|
||||||
/* labelled CONTINUE matching this loop, so continue in loop */ \
|
/* labeled CONTINUE matching this loop, so continue in loop */ \
|
||||||
estate->exitlabel = NULL; \
|
estate->exitlabel = NULL; \
|
||||||
rc = PLPGSQL_RC_OK; \
|
rc = PLPGSQL_RC_OK; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
/* non-matching labelled CONTINUE, propagate RC_CONTINUE out */ \
|
/* non-matching labeled CONTINUE, propagate RC_CONTINUE out */ \
|
||||||
exit_action; \
|
exit_action; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
@ -1725,7 +1725,7 @@ stmt_exit : exit_type opt_label opt_exitcond
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* No label, so make sure there is some loop (an
|
* No label, so make sure there is some loop (an
|
||||||
* unlabelled EXIT does not match a block, so this
|
* unlabeled EXIT does not match a block, so this
|
||||||
* is the same test for both EXIT and CONTINUE)
|
* is the same test for both EXIT and CONTINUE)
|
||||||
*/
|
*/
|
||||||
if (plpgsql_ns_find_nearest_loop(plpgsql_ns_top()) == NULL)
|
if (plpgsql_ns_find_nearest_loop(plpgsql_ns_top()) == NULL)
|
||||||
@ -3749,7 +3749,7 @@ check_labels(const char *start_label, const char *end_label, int end_location)
|
|||||||
if (!start_label)
|
if (!start_label)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
errmsg("end label \"%s\" specified for unlabelled block",
|
errmsg("end label \"%s\" specified for unlabeled block",
|
||||||
end_label),
|
end_label),
|
||||||
parser_errposition(end_location)));
|
parser_errposition(end_location)));
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ typedef struct PLpgSQL_stmt_exit
|
|||||||
int lineno;
|
int lineno;
|
||||||
unsigned int stmtid;
|
unsigned int stmtid;
|
||||||
bool is_exit; /* Is this an exit or a continue? */
|
bool is_exit; /* Is this an exit or a continue? */
|
||||||
char *label; /* NULL if it's an unlabelled EXIT/CONTINUE */
|
char *label; /* NULL if it's an unlabeled EXIT/CONTINUE */
|
||||||
PLpgSQL_expr *cond;
|
PLpgSQL_expr *cond;
|
||||||
} PLpgSQL_stmt_exit;
|
} PLpgSQL_stmt_exit;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user