forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6dda292
committed
Allow datetime values in JsonbValue
SQL/JSON standard allows manipulation with datetime values. So, it appears tobe convinient to allow datetime values to be represented in JsonbValue struct.These datetime values are allowed for temporary representation only. Duringserialization datetime values are converted into strings.SQL/JSON requires writing timestamps with timezone in the same timezone offsetas they were parsed. This is why we allow storage of timezone offset inJsonbValue struct. For the same reason timezone offset argument is added toJsonEncodeDateTime() function.Extracted from original patch by Nikita Glukhov, Teodor Sigaev, Oleg Bartunov.Revised by me. Comments were adjusted by Liudmila Mantrova.Discussion:https://postgr.es/m/fcc6fc6a-b497-f39a-923d-aa34d0c588e8%402ndQuadrant.comDiscussion:https://postgr.es/m/CAPpHfdsZgYEra_PeCLGNoXOWYx6iU-S3wF8aX0ObQUcZU%2B4XTw%40mail.gmail.comAuthor: Nikita Glukhov, Teodor Sigaev, Oleg Bartunov, Alexander Korotkov, Liudmila MantrovaReviewed-by: Anastasia Lubennikova, Peter Eisentraut1 parent5bc4506 commit6dda292
File tree
5 files changed
+94
-13
lines changed- src
- backend/utils/adt
- include/utils
5 files changed
+94
-13
lines changedLines changed: 26 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1506 | 1506 |
| |
1507 | 1507 |
| |
1508 | 1508 |
| |
1509 |
| - | |
| 1509 | + | |
1510 | 1510 |
| |
1511 | 1511 |
| |
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 | 1514 |
| |
1515 | 1515 |
| |
1516 | 1516 |
| |
1517 |
| - | |
| 1517 | + | |
1518 | 1518 |
| |
1519 | 1519 |
| |
1520 | 1520 |
| |
1521 | 1521 |
| |
1522 | 1522 |
| |
1523 | 1523 |
| |
1524 | 1524 |
| |
1525 |
| - | |
| 1525 | + | |
1526 | 1526 |
| |
1527 | 1527 |
| |
1528 | 1528 |
| |
| |||
1550 | 1550 |
| |
1551 | 1551 |
| |
1552 | 1552 |
| |
1553 |
| - | |
| 1553 | + | |
| 1554 | + | |
1554 | 1555 |
| |
1555 | 1556 |
| |
1556 |
| - | |
| 1557 | + | |
1557 | 1558 |
| |
1558 | 1559 |
| |
1559 | 1560 |
| |
| |||
1630 | 1631 |
| |
1631 | 1632 |
| |
1632 | 1633 |
| |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1633 | 1647 |
| |
1634 | 1648 |
| |
1635 | 1649 |
| |
1636 |
| - | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1637 | 1656 |
| |
| 1657 | + | |
1638 | 1658 |
| |
1639 | 1659 |
| |
1640 | 1660 |
| |
|
Lines changed: 24 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
209 | 227 |
| |
210 | 228 |
| |
211 | 229 |
| |
| |||
805 | 823 |
| |
806 | 824 |
| |
807 | 825 |
| |
808 |
| - | |
| 826 | + | |
| 827 | + | |
809 | 828 |
| |
810 | 829 |
| |
811 | 830 |
| |
812 | 831 |
| |
813 |
| - | |
| 832 | + | |
| 833 | + | |
814 | 834 |
| |
815 | 835 |
| |
816 | 836 |
| |
817 | 837 |
| |
818 |
| - | |
| 838 | + | |
| 839 | + | |
819 | 840 |
| |
820 | 841 |
| |
821 | 842 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
| 20 | + | |
19 | 21 |
| |
| 22 | + | |
20 | 23 |
| |
21 | 24 |
| |
22 | 25 |
| |
| |||
244 | 247 |
| |
245 | 248 |
| |
246 | 249 |
| |
| 250 | + | |
| 251 | + | |
247 | 252 |
| |
248 | 253 |
| |
249 | 254 |
| |
| |||
1786 | 1791 |
| |
1787 | 1792 |
| |
1788 | 1793 |
| |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1789 | 1810 |
| |
1790 | 1811 |
| |
1791 | 1812 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
| 165 | + | |
165 | 166 |
| |
166 | 167 |
|
Lines changed: 21 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
244 |
| - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
245 | 253 |
| |
246 | 254 |
| |
247 | 255 |
| |
| |||
282 | 290 |
| |
283 | 291 |
| |
284 | 292 |
| |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
285 | 302 |
| |
286 | 303 |
| |
287 | 304 |
| |
288 |
| - | |
289 |
| - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
290 | 308 |
| |
291 | 309 |
| |
292 | 310 |
| |
|
0 commit comments
Comments
(0)