forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit9bd0fee
committed
Improvements to GetErrorContextStack()
As GetErrorContextStack() borrowed setup and tear-down code from otherplaces, it was less than clear that it must only be called as atop-level entry point into the error system and can't be called by anexception handler (unlike the rest of the error system, which is set upto be reentrant-safe).Being called from an exception handler is outside the charter ofGetErrorContextStack(), so add a bit more protection against it,improve the comments addressing why we have to set up an errordatastack for this function at all, and add a few more regression tests.Lack of clarity pointed out by Tom Lane; all bugs are mine.1 parente4c6ccc commit9bd0fee
File tree
3 files changed
+105
-25
lines changed- src
- backend/utils/error
- test/regress
- expected
- sql
3 files changed
+105
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
| 1630 | + | |
1631 | 1631 | | |
1632 | | - | |
| 1632 | + | |
1633 | 1633 | | |
1634 | 1634 | | |
1635 | 1635 | | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
1636 | 1640 | | |
1637 | 1641 | | |
1638 | 1642 | | |
| |||
1648 | 1652 | | |
1649 | 1653 | | |
1650 | 1654 | | |
1651 | | - | |
1652 | | - | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
1653 | 1665 | | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | 1666 | | |
1659 | | - | |
| 1667 | + | |
| 1668 | + | |
1660 | 1669 | | |
1661 | 1670 | | |
1662 | | - | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
1663 | 1677 | | |
1664 | 1678 | | |
1665 | 1679 | | |
1666 | | - | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1667 | 1685 | | |
1668 | 1686 | | |
1669 | 1687 | | |
1670 | 1688 | | |
1671 | 1689 | | |
1672 | 1690 | | |
1673 | 1691 | | |
1674 | | - | |
| 1692 | + | |
| 1693 | + | |
1675 | 1694 | | |
1676 | 1695 | | |
1677 | 1696 | | |
| |||
1688 | 1707 | | |
1689 | 1708 | | |
1690 | 1709 | | |
1691 | | - | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
1692 | 1716 | | |
1693 | 1717 | | |
1694 | 1718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4904 | 4904 | | |
4905 | 4905 | | |
4906 | 4906 | | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
4907 | 4911 | | |
4908 | 4912 | | |
4909 | 4913 | | |
4910 | 4914 | | |
4911 | 4915 | | |
| 4916 | + | |
| 4917 | + | |
4912 | 4918 | | |
4913 | | - | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
4914 | 4923 | | |
4915 | 4924 | | |
4916 | 4925 | | |
4917 | 4926 | | |
| 4927 | + | |
| 4928 | + | |
4918 | 4929 | | |
4919 | | - | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
4920 | 4934 | | |
4921 | 4935 | | |
4922 | 4936 | | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
4923 | 4940 | | |
4924 | | - | |
4925 | | - | |
4926 | | - | |
4927 | | - | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + | |
| 4947 | + | |
| 4948 | + | |
| 4949 | + | |
| 4950 | + | |
| 4951 | + | |
| 4952 | + | |
| 4953 | + | |
| 4954 | + | |
| 4955 | + | |
4928 | 4956 | | |
4929 | 4957 | | |
4930 | 4958 | | |
4931 | 4959 | | |
4932 | 4960 | | |
4933 | 4961 | | |
4934 | 4962 | | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
4935 | 4966 | | |
4936 | | - | |
4937 | | - | |
4938 | | - | |
4939 | | - | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
4940 | 4982 | | |
4941 | 4983 | | |
4942 | 4984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3888 | 3888 | | |
3889 | 3889 | | |
3890 | 3890 | | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
3891 | 3895 | | |
3892 | 3896 | | |
3893 | 3897 | | |
3894 | 3898 | | |
3895 | 3899 | | |
3896 | 3900 | | |
| 3901 | + | |
| 3902 | + | |
3897 | 3903 | | |
3898 | | - | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
3899 | 3908 | | |
3900 | 3909 | | |
3901 | 3910 | | |
3902 | 3911 | | |
3903 | 3912 | | |
| 3913 | + | |
| 3914 | + | |
3904 | 3915 | | |
3905 | | - | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
3906 | 3920 | | |
3907 | 3921 | | |
3908 | 3922 | | |
| |||
0 commit comments
Comments
(0)