forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit74a1d4f
committed
Improve behavior of concurrent rename statements.
Previously, renaming a table, sequence, view, index, foreign table,column, or trigger checked permissions before locking the object, whichmeant that if permissions were revoked during the lock wait, we wouldstill allow the operation. Similarly, if the original object is droppedand a new one with the same name is created, the operation will be allowedif we had permissions on the old object; the permissions on the newobject don't matter. All this is now fixed.Along the way, attempting to rename a trigger on a foreign table now givesthe same error message as trying to create one there in the first place(i.e. that it's not a table or view) rather than simply stating that notrigger by that name exists.Patch by me; review by Noah Misch.1 parentd039fd5 commit74a1d4f
File tree
7 files changed
+192
-141
lines changed- src
- backend/commands
- include/commands
7 files changed
+192
-141
lines changedLines changed: 9 additions & 53 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 |
| |
109 | 113 |
| |
| 114 | + | |
| 115 | + | |
| 116 | + | |
110 | 117 |
| |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
| 118 | + | |
| 119 | + | |
164 | 120 |
| |
165 | 121 |
| |
166 | 122 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1474 | 1474 |
| |
1475 | 1475 |
| |
1476 | 1476 |
| |
1477 |
| - | |
1478 | 1477 |
| |
1479 | 1478 |
| |
1480 | 1479 |
| |
1481 | 1480 |
| |
1482 | 1481 |
| |
1483 |
| - | |
1484 | 1482 |
| |
1485 | 1483 |
| |
1486 | 1484 |
| |
1487 | 1485 |
| |
1488 | 1486 |
| |
1489 | 1487 |
| |
1490 |
| - | |
1491 |
| - | |
| 1488 | + | |
1492 | 1489 |
| |
1493 | 1490 |
| |
1494 | 1491 |
| |
1495 | 1492 |
| |
1496 | 1493 |
| |
1497 |
| - | |
1498 |
| - | |
| 1494 | + | |
1499 | 1495 |
| |
1500 | 1496 |
| |
1501 | 1497 |
| |
|
0 commit comments
Comments
(0)