forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4649003
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 parent18914f2 commit4649003
File tree
4 files changed
+60
-6
lines changed- src
- backend/parser
- include/nodes
- test/regress
- expected
- sql
4 files changed
+60
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3170 | 3170 | | |
3171 | 3171 | | |
3172 | 3172 | | |
3173 | | - | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
3174 | 3181 | | |
3175 | 3182 | | |
3176 | 3183 | | |
3177 | 3184 | | |
3178 | 3185 | | |
3179 | 3186 | | |
| 3187 | + | |
| 3188 | + | |
3180 | 3189 | | |
3181 | 3190 | | |
3182 | 3191 | | |
| |||
3206 | 3215 | | |
3207 | 3216 | | |
3208 | 3217 | | |
3209 | | - | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
3210 | 3223 | | |
3211 | 3224 | | |
3212 | 3225 | | |
| |||
3227 | 3240 | | |
3228 | 3241 | | |
3229 | 3242 | | |
| 3243 | + | |
| 3244 | + | |
3230 | 3245 | | |
3231 | 3246 | | |
3232 | 3247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3026 | 3026 | | |
3027 | 3027 | | |
3028 | 3028 | | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
3029 | 3054 | | |
3030 | 3055 | | |
3031 | 3056 | | |
| |||
| 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)