1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

pgbench: Remove \cset

Partial revert of commit 6260cc550b, "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
This commit is contained in:
Alvaro Herrera
2019-03-25 12:16:07 -03:00
parent 6f97457e0d
commit 25ee70511e
6 changed files with 56 additions and 238 deletions

View File

@@ -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.
*