From 25ee70511ec2ccbef0ad3fe64875a4d552cdcd50 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 25 Mar 2019 12:16:07 -0300 Subject: 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 --- src/fe_utils/psqlscan.l | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'src/fe_utils') 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); @@ -1218,16 +1208,6 @@ psql_scan_reset(PsqlScanState state) state->dolqstart = NULL; } -/* - * 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. * -- cgit v1.2.3