pgsql: Re-forbid underscore in positional parameters - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Re-forbid underscore in positional parameters
Date
Msg-id E1s7DG2-000Khk-Ce@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Re-forbid underscore in positional parameters

Underscores were added to numeric literals in faff8f8e47.  This change
also affected the positional parameters (e.g., $1) rule, which uses
the same production for its digits.  But this did not actually work,
because the digits for parameters are processed using atol(), which
does not handle underscores and ignores whatever it cannot parse.

The underscores notation is probably not useful for positional
parameters, so for simplicity revert that rule to its old form that
only accepts digits 0-9.

Author: Erik Wienhold <ewie@ewie.name>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/5d216d1c-91f6-4cbe-95e2-b4cbd930520c%40ewie.name

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/315661ecafbcbb23116cceea2ea80657d7763af0

Modified Files
--------------
src/backend/parser/scan.l                | 5 +++--
src/fe_utils/psqlscan.l                  | 5 +++--
src/interfaces/ecpg/preproc/pgc.l        | 5 +++--
src/test/regress/expected/numerology.out | 4 ++++
src/test/regress/sql/numerology.sql      | 1 +
5 files changed, 14 insertions(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: doc: Remove claims that initdb and pg_ctl use libpq environment
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: Fix query result leak during binary upgrade