Commit 79afe6e
committed
Render infinite date/timestamps as 'infinity' for json/jsonb
Commit ab14a73 raised an error in these cases and later the
behaviour was copied to jsonb. This is what the XML code, which we
then adopted, does, as the XSD types don't accept infinite values.
However, json dates and timestamps are just strings as far as json is
concerned, so there is no reason not to render these values as
'infinity'.
The json portion of this is backpatched to 9.4 where the behaviour was
introduced. The jsonb portion only affects the development branch.
Per gripe on pgsql-general.1 parent d721151 commit 79afe6e
File tree
4 files changed
+76
-21
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+76
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
1427 | 1430 | | |
1428 | 1431 | | |
1429 | 1432 | | |
1430 | | - | |
1431 | 1433 | | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
1436 | 1438 | | |
1437 | 1439 | | |
1438 | 1440 | | |
1439 | 1441 | | |
1440 | 1442 | | |
| 1443 | + | |
1441 | 1444 | | |
1442 | | - | |
1443 | | - | |
1444 | 1445 | | |
1445 | 1446 | | |
1446 | 1447 | | |
| |||
1452 | 1453 | | |
1453 | 1454 | | |
1454 | 1455 | | |
1455 | | - | |
1456 | 1456 | | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
1461 | 1461 | | |
| 1462 | + | |
1462 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
1463 | 1466 | | |
1464 | 1467 | | |
1465 | 1468 | | |
1466 | 1469 | | |
1467 | | - | |
1468 | | - | |
1469 | 1470 | | |
1470 | 1471 | | |
1471 | 1472 | | |
| |||
1479 | 1480 | | |
1480 | 1481 | | |
1481 | 1482 | | |
1482 | | - | |
1483 | 1483 | | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1488 | 1488 | | |
| 1489 | + | |
1489 | 1490 | | |
| 1491 | + | |
| 1492 | + | |
1490 | 1493 | | |
1491 | 1494 | | |
1492 | 1495 | | |
1493 | 1496 | | |
1494 | | - | |
1495 | | - | |
1496 | 1497 | | |
1497 | 1498 | | |
1498 | 1499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
429 | 453 | | |
430 | 454 | | |
431 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
429 | 453 | | |
430 | 454 | | |
431 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
| |||
0 commit comments