summaryrefslogtreecommitdiff
path: root/src/fe_utils
diff options
context:
space:
mode:
authorAlvaro Herrera2019-03-25 15:16:07 +0000
committerAlvaro Herrera2019-03-25 15:16:07 +0000
commit25ee70511ec2ccbef0ad3fe64875a4d552cdcd50 (patch)
treec09319d58c61a901f01d8a58ceace8f5fd540c7f /src/fe_utils
parent6f97457e0ddd8b421ca5e483439ef0318e6fc89a (diff)
pgbench: Remove \cset
Partial revert of commit 6260cc550b0e, "pgbench: add \cset and \gset commands". While \gset is widely considered a useful and necessary tool for user- defined benchmarks, \cset does not have as much value, and its implementation was considered "not to be up to project standards" (though I, Álvaro, can't quite understand exactly how). Therefore, remove \cset. Author: Fabien Coelho Discussion: https://postgr.es/m/alpine.DEB.2.21.1903230716030.18811@lancre Discussion: https://postgr.es/m/201901101900.mv7zduch6sad@alvherre.pgsql
Diffstat (limited to 'src/fe_utils')
-rw-r--r--src/fe_utils/psqlscan.l24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/fe_utils/psqlscan.l b/src/fe_utils/psqlscan.l
index 321744cddbb..b31527b94f4 100644
--- a/src/fe_utils/psqlscan.l
+++ b/src/fe_utils/psqlscan.l
@@ -693,15 +693,8 @@ other .
* substitution. We want these before {self}, also.
*/
-"\\"; {
- /* Count semicolons in compound commands */
- cur_state->escaped_semicolons++;
- /* Force a semicolon into the query buffer */
- psqlscan_emit(cur_state, yytext + 1, 1);
- }
-
-"\\": {
- /* Force a colon into the query buffer */
+"\\"[;:] {
+ /* Force a semi-colon or colon into the query buffer */
psqlscan_emit(cur_state, yytext + 1, 1);
}
@@ -1072,9 +1065,6 @@ psql_scan(PsqlScanState state,
/* Set current output target */
state->output_buf = query_buf;
- /* Reset number of escaped semicolons seen */
- state->escaped_semicolons = 0;
-
/* Set input source */
if (state->buffer_stack != NULL)
yy_switch_to_buffer(state->buffer_stack->buf, state->scanner);
@@ -1219,16 +1209,6 @@ psql_scan_reset(PsqlScanState state)
}
/*
- * Return the number of escaped semicolons in the lexed string seen by the
- * previous psql_scan call.
- */
-int
-psql_scan_get_escaped_semicolons(PsqlScanState state)
-{
- return state->escaped_semicolons;
-}
-
-/*
* Reselect this lexer (psqlscan.l) after using another one.
*
* Currently and for foreseeable uses, it's sufficient to reset to INITIAL