forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc2232f
committed
Disallow NaN as a value for floating-point GUCs.
None of the code that uses GUC values is really prepared for them tohold NaN, but parse_real() didn't have any defense against acceptingsuch a value. Treat it the same as a syntax error.I haven't attempted to analyze the exact consequences of setting anyof the float GUCs to NaN, but since they're quite unlikely to be good,this seems like a back-patchable bug fix.Note: we don't need an explicit test for +-Infinity because those willbe rejected by existing range checks. I added a regression test forthat in HEAD, but not older branches because the spelling of the valuein the error message will be platform-dependent in branches where wedon't always use port/snprintf.c.Discussion:https://postgr.es/m/1798.1552165479@sss.pgh.pa.us1 parent7d7de6d commitbc2232f
3 files changed
+13
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5847 | 5847 |
| |
5848 | 5848 |
| |
5849 | 5849 |
| |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
5850 | 5854 |
| |
5851 | 5855 |
| |
5852 | 5856 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
509 | 514 |
| |
510 | 515 |
| |
511 | 516 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 |
| |
148 | 152 |
| |
149 | 153 |
| |
|
0 commit comments
Comments
(0)