Commit cb599b9
committed
Make jsonpath .string() be immutable for datetimes.
Discussion of commit ed055d2 revealed that we don't actually
want jsonpath's .string() method to depend on DateStyle, nor
TimeZone either, because the non-"_tz" jsonpath functions are
supposed to be immutable. Potentially we could allow a TimeZone
dependency in the "_tz" variants, but it seems better to just
uniformly define this method as returning the same string that
jsonb text output would do. That's easier to implement too,
saving a couple dozen lines.
Patch by me, per complaint from Peter Eisentraut. Back-patch
to v17 where this feature came in (in 66ea94e). Also
back-patch ed055d2 to provide test cases.
Discussion: https://postgr.es/m/5e8879d0-a3c8-4be2-950f-d83aa2af953a@eisentraut.org1 parent 4eada20 commit cb599b9
File tree
4 files changed
+39
-87
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+39
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18017 | 18017 | | |
18018 | 18018 | | |
18019 | 18019 | | |
18020 | | - | |
18021 | | - | |
| 18020 | + | |
18022 | 18021 | | |
18023 | 18022 | | |
18024 | 18023 | | |
18025 | 18024 | | |
18026 | 18025 | | |
18027 | 18026 | | |
18028 | | - | |
18029 | | - | |
| 18027 | + | |
| 18028 | + | |
18030 | 18029 | | |
18031 | 18030 | | |
18032 | 18031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
1629 | 1630 | | |
1630 | 1631 | | |
1631 | 1632 | | |
1632 | | - | |
1633 | | - | |
1634 | | - | |
1635 | | - | |
1636 | | - | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
1658 | 1640 | | |
1659 | 1641 | | |
1660 | 1642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2652 | 2652 | | |
2653 | 2653 | | |
2654 | 2654 | | |
2655 | | - | |
2656 | | - | |
2657 | | - | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
2658 | 2658 | | |
2659 | 2659 | | |
2660 | 2660 | | |
2661 | 2661 | | |
2662 | 2662 | | |
2663 | 2663 | | |
2664 | | - | |
2665 | | - | |
2666 | | - | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
2667 | 2667 | | |
2668 | 2668 | | |
2669 | 2669 | | |
2670 | | - | |
2671 | | - | |
2672 | | - | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | 2675 | | |
2676 | | - | |
2677 | | - | |
2678 | | - | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
2679 | 2679 | | |
2680 | 2680 | | |
2681 | 2681 | | |
| |||
2687 | 2687 | | |
2688 | 2688 | | |
2689 | 2689 | | |
2690 | | - | |
| 2690 | + | |
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
| |||
2699 | 2699 | | |
2700 | 2700 | | |
2701 | 2701 | | |
2702 | | - | |
2703 | | - | |
2704 | | - | |
2705 | | - | |
2706 | | - | |
2707 | | - | |
2708 | | - | |
2709 | | - | |
| 2702 | + | |
2710 | 2703 | | |
2711 | 2704 | | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
2712 | 2709 | | |
2713 | | - | |
2714 | | - | |
2715 | | - | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
2716 | 2713 | | |
2717 | 2714 | | |
2718 | 2715 | | |
2719 | 2716 | | |
2720 | 2717 | | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
2727 | | - | |
2728 | | - | |
2729 | | - | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | | - | |
2734 | | - | |
2735 | | - | |
2736 | | - | |
2737 | | - | |
2738 | | - | |
2739 | | - | |
2740 | | - | |
2741 | | - | |
2742 | | - | |
2743 | | - | |
2744 | | - | |
2745 | | - | |
| 2718 | + | |
2746 | 2719 | | |
2747 | 2720 | | |
2748 | | - | |
| 2721 | + | |
2749 | 2722 | | |
2750 | 2723 | | |
2751 | 2724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
615 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
616 | 618 | | |
617 | 619 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
| 620 | + | |
623 | 621 | | |
624 | 622 | | |
625 | 623 | | |
| |||
0 commit comments