Disallow a digit as the first character of a variable name in pgbench.
authorTom Lane
Wed, 13 Jan 2021 19:52:49 +0000 (14:52 -0500)
committerTom Lane
Wed, 13 Jan 2021 19:52:49 +0000 (14:52 -0500)
commit3e214fafcea73d92f97da91bd76339e8ba7607b2
treee6e21df772129a18e811fda1b5a185b8e943d6d2
parent0363b7e908cdbcac060b82e97232b35ab3caa484
Disallow a digit as the first character of a variable name in pgbench.

The point of this restriction is to avoid trying to substitute variables
into timestamp literal values, which may contain strings like '12:34'.

There is a good deal more that should be done to reduce pgbench's
tendency to substitute where it shouldn't.  But this is sufficient to
solve the case complained of by Jaime Soler, and it's simple enough
to back-patch.

Back-patch to v11; before commit 9d36a3866, pgbench had a slightly
different definition of what a variable name is, and anyway it seems
unwise to change long-stable branches for this.

Fabien Coelho

Discussion: https://postgr.es/m/alpine.DEB.2.22.394.2006291740420.805678@pseudo
doc/src/sgml/ref/pgbench.sgml
src/bin/pgbench/pgbench.c