forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7fa367d
committed
Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
transformLockingClause neglected to exclude the pseudo-RTEs forOLD/NEW when processing a rule's query. This led to odd errorsor even crashes later on. This bug is very ancient, but it'snot terribly surprising that nobody noticed, since the use-casefor SELECT FOR UPDATE in a non-view rule is somewhere betweenthin and non-existent. Still, crashing is not OK.Per bug #17151 from Zhiyong Wu. Thanks to Masahiko Sawadafor analysis of the problem.Discussion:https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org1 parentecd4dd9 commit7fa367d
File tree
4 files changed
+60
-6
lines changed- src
- backend/parser
- include/nodes
- test/regress
- expected
- sql
4 files changed
+60
-6
lines changedLines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2753 | 2753 |
| |
2754 | 2754 |
| |
2755 | 2755 |
| |
2756 |
| - | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
2757 | 2764 |
| |
2758 | 2765 |
| |
2759 | 2766 |
| |
2760 | 2767 |
| |
2761 | 2768 |
| |
2762 | 2769 |
| |
| 2770 | + | |
| 2771 | + | |
2763 | 2772 |
| |
2764 | 2773 |
| |
2765 | 2774 |
| |
| |||
2789 | 2798 |
| |
2790 | 2799 |
| |
2791 | 2800 |
| |
2792 |
| - | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
2793 | 2806 |
| |
2794 | 2807 |
| |
2795 | 2808 |
| |
| |||
2810 | 2823 |
| |
2811 | 2824 |
| |
2812 | 2825 |
| |
| 2826 | + | |
| 2827 | + | |
2813 | 2828 |
| |
2814 | 2829 |
| |
2815 | 2830 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
918 |
| - | |
919 |
| - | |
920 |
| - | |
921 |
| - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
922 | 922 |
| |
923 | 923 |
| |
924 | 924 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2887 | 2887 |
| |
2888 | 2888 |
| |
2889 | 2889 |
| |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
2890 | 2915 |
| |
2891 | 2916 |
| |
2892 | 2917 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
992 | 992 |
| |
993 | 993 |
| |
994 | 994 |
| |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
995 | 1009 |
| |
996 | 1010 |
| |
997 | 1011 |
| |
|
0 commit comments
Comments
(0)