| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Allow NumericOnly to be "+ FCONST". |
| Date: | 2017-05-29 19:19:26 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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/[email protected]
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/096221e85d36ccf66aa5e9e867acd00385b1d9d8
Modified Files
--------------
src/backend/parser/gram.y | 1 +
1 file changed, 1 insertion(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2017-05-29 21:08:52 | pgsql: Prevent running pg_resetwal/pg_resetxlog against wrong-version d |
| Previous Message | Tom Lane | 2017-05-29 18:24:36 | pgsql: More code review for get_qual_for_list(). |