- Notifications
You must be signed in to change notification settings - Fork5
Commit78ed8e0
committed
Fix unescaping of JSON Unicode escapes, especially for non-UTF8.
Per discussion on -hackers. We treat Unicode escapes when unescapingthem similarly to the way we treat them in PostgreSQL string literals.Escapes in the ASCII range are always accepted, no matter what thedatabase encoding. Escapes for higher code points are only processed inUTF8 databases, and attempts to process them in other databases willresult in an error. \u0000 is never unescaped, since it would result inan impermissible null byte.1 parentc1d729b commit78ed8e0
File tree
5 files changed
+1033
-11
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
5 files changed
+1033
-11
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10159 | 10159 |
| |
10160 | 10160 |
| |
10161 | 10161 |
| |
| 10162 | + | |
| 10163 | + | |
| 10164 | + | |
| 10165 | + | |
| 10166 | + | |
| 10167 | + | |
| 10168 | + | |
| 10169 | + | |
| 10170 | + | |
| 10171 | + | |
| 10172 | + | |
10162 | 10173 |
| |
10163 | 10174 |
| |
10164 | 10175 |
| |
|
Lines changed: 34 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
720 |
| - | |
721 | 720 |
| |
722 | 721 |
| |
723 | 722 |
| |
| |||
749 | 748 |
| |
750 | 749 |
| |
751 | 750 |
| |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
757 |
| - | |
758 |
| - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
759 | 785 |
| |
760 | 786 |
| |
761 | 787 |
| |
|
Lines changed: 21 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
921 | 921 |
| |
922 | 922 |
| |
923 | 923 |
| |
924 |
| - | |
925 |
| - | |
| 924 | + | |
| 925 | + | |
926 | 926 |
| |
927 | 927 |
| |
928 | 928 |
| |
| |||
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + |
0 commit comments
Comments
(0)