[COMMITTERS] pgsql: Allow NumericOnly to be "+ FCONST". - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Allow NumericOnly to be "+ FCONST".
Date
Msg-id E1dFQCM-0006Ej-IW@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Allow NumericOnly to be "+ FCONST".

The NumericOnly grammar production accepted ICONST, + ICONST, - ICONST,
FCONST, and - FCONST, but for some reason not + FCONST.  This led to
strange inconsistencies like

regression=# set random_page_cost = +4;
SET
regression=# set random_page_cost = 4000000000;
SET
regression=# set random_page_cost = +4000000000;
ERROR:  syntax error at or near "4000000000"

(because 4000000000 is too large to be an ICONST).  While there's
no actual functional reason to need to write a "+", if we allow
it for integers it seems like we should allow it for numerics too.

It's been like that forever, so back-patch to all supported branches.

Discussion: https://postgr.es/m/30908.1496006184@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ce509452955487c9e11d042b6a564c76600334db

Modified Files
--------------
src/backend/parser/gram.y | 1 +
1 file changed, 1 insertion(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: More code review for get_qual_for_list().
Next
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Prevent running pg_resetwal/pg_resetxlog against wrong-versiond