pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Disallow a digit as the first character of a variable name in pg 4+ messages / 1 participants [nested] [flat]
* pgsql: Disallow a digit as the first character of a variable name in pg @ 2021-01-13 19:53 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-13 19:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c21ea4d53e9404279273da800daa49b7b9a5e81e Modified Files -------------- doc/src/sgml/ref/pgbench.sgml | 2 +- src/bin/pgbench/pgbench.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Disallow a digit as the first character of a variable name in pg @ 2021-01-13 19:53 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-13 19:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6b045ca6cce01f1512af3438a8d4db4dc83b2d07 Modified Files -------------- doc/src/sgml/ref/pgbench.sgml | 2 +- src/bin/pgbench/pgbench.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Disallow a digit as the first character of a variable name in pg @ 2021-01-13 19:53 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-13 19:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3e214fafcea73d92f97da91bd76339e8ba7607b2 Modified Files -------------- doc/src/sgml/ref/pgbench.sgml | 2 +- src/bin/pgbench/pgbench.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Disallow a digit as the first character of a variable name in pg @ 2021-01-13 19:53 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-13 19:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d8bb22ab3c9982aeb2b7cb1df964c9fec56fde39 Modified Files -------------- doc/src/sgml/ref/pgbench.sgml | 2 +- src/bin/pgbench/pgbench.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-01-13 19:53 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-13 19:53 pgsql: Disallow a digit as the first character of a variable name in pg Tom Lane <tgl@sss.pgh.pa.us> 2021-01-13 19:53 pgsql: Disallow a digit as the first character of a variable name in pg Tom Lane <tgl@sss.pgh.pa.us> 2021-01-13 19:53 pgsql: Disallow a digit as the first character of a variable name in pg Tom Lane <tgl@sss.pgh.pa.us> 2021-01-13 19:53 pgsql: Disallow a digit as the first character of a variable name in pg Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox