forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitac75959
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 parent203749a commitac75959
3 files changed
+16
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6149 | 6149 |
| |
6150 | 6150 |
| |
6151 | 6151 |
| |
| 6152 | + | |
| 6153 | + | |
| 6154 | + | |
| 6155 | + | |
6152 | 6156 |
| |
6153 | 6157 |
| |
6154 | 6158 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
509 | 516 |
| |
510 | 517 |
| |
511 | 518 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
147 | 152 |
| |
148 | 153 |
| |
149 | 154 |
| |
|
0 commit comments
Comments
(0)