pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow a digit as the first character of a variable name in pg
Date: Wed, 13 Jan 2021 19:53:17 +0000
Message-ID: <E1kzmCj-0000Mv-4W@gemulon.postgresql.org> (raw)

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(-)



view thread (4+ messages)

Message-ID: <E1kzmCj-0000Mv-4W@gemulon.postgresql.org>
Permalink:  ../E1kzmCj-0000Mv-4W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kzmCj-0000Mv-4W@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Disallow a digit as the first character of a variable name in pg
  In-Reply-To: <E1kzmCj-0000Mv-4W@gemulon.postgresql.org>
  References: <E1kzmCj-0000Mv-4W@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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