summaryrefslogtreecommitdiff
path: root/src/include/fe_utils/psqlscan_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/fe_utils/psqlscan_int.h')
-rw-r--r--src/include/fe_utils/psqlscan_int.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/fe_utils/psqlscan_int.h b/src/include/fe_utils/psqlscan_int.h
index 91d7d4d5c6c..8ada9770927 100644
--- a/src/include/fe_utils/psqlscan_int.h
+++ b/src/include/fe_utils/psqlscan_int.h
@@ -114,8 +114,14 @@ typedef struct PsqlScanStateData
int paren_depth; /* depth of nesting in parentheses */
int xcdepth; /* depth of nesting in slash-star comments */
char *dolqstart; /* current $foo$ quote start string */
+
+ /*
+ * State to track boundaries of BEGIN ... END blocks in function
+ * definitions, so that semicolons do not send query too early.
+ */
int identifier_count; /* identifiers since start of statement */
- int begin_depth; /* depth of begin/end routine body blocks */
+ char identifiers[4]; /* records the first few identifiers */
+ int begin_depth; /* depth of begin/end pairs */
/*
* Callback functions provided by the program making use of the lexer,