forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit927d9ab
committed
Support for ISO 8601 in the jsonpath .datetime() method
The SQL standard doesn't require jsonpath .datetime() method to support theISO 8601 format. But our to_json[b]() functions convert timestamps to text inthe ISO 8601 format in the sake of compatibility with javascript. So, we addsupport of the ISO 8601 to the jsonpath .datetime() in the sake compatibilitywith to_json[b]().The standard mode of datetime parsing currently supports just template patternsand separators in the format string. In order to implement ISO 8601, we have toadd support of the format string double quotes to the standard parsing mode.Discussion:https://postgr.es/m/94321be0-cc96-1a81-b6df-796f437f7c66%40postgrespro.ruAuthor: Nikita Glukhov, revised by meBackpatch-through: 131 parentc2aa562 commit927d9ab
File tree
4 files changed
+49
-4
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+49
-4
lines changedLines changed: 17 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1381 | 1381 |
| |
1382 | 1382 |
| |
1383 | 1383 |
| |
1384 |
| - | |
| 1384 | + | |
1385 | 1385 |
| |
1386 | 1386 |
| |
1387 |
| - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1388 | 1390 |
| |
1389 | 1391 |
| |
1390 | 1392 |
| |
| |||
3346 | 3348 |
| |
3347 | 3349 |
| |
3348 | 3350 |
| |
3349 |
| - | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + | |
3350 | 3364 |
| |
3351 | 3365 |
| |
3352 | 3366 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1833 | 1833 |
| |
1834 | 1834 |
| |
1835 | 1835 |
| |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
1836 | 1839 |
| |
1837 | 1840 |
| |
1838 | 1841 |
| |
| |||
1842 | 1845 |
| |
1843 | 1846 |
| |
1844 | 1847 |
| |
1845 |
| - | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
1846 | 1852 |
| |
1847 | 1853 |
| |
1848 | 1854 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1722 | 1722 |
| |
1723 | 1723 |
| |
1724 | 1724 |
| |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
1725 | 1735 |
| |
1726 | 1736 |
| |
1727 | 1737 |
| |
| |||
1901 | 1911 |
| |
1902 | 1912 |
| |
1903 | 1913 |
| |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1904 | 1923 |
| |
1905 | 1924 |
| |
1906 | 1925 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
368 | 368 |
| |
369 | 369 |
| |
370 | 370 |
| |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
371 | 375 |
| |
372 | 376 |
| |
373 | 377 |
| |
| |||
408 | 412 |
| |
409 | 413 |
| |
410 | 414 |
| |
| 415 | + | |
| 416 | + | |
411 | 417 |
| |
412 | 418 |
| |
413 | 419 |
| |
|
0 commit comments
Comments
(0)