forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit21378e1
committed
Fix ALTER DEFAULT PRIVILEGES with duplicated objects
Specifying duplicated objects in this command would lead to uniqueconstraint violations in pg_default_acl or "tuple already updated byself" errors. Similarly to GRANT/REVOKE, increment the command ID aftereach subcommand processing to allow this case to work transparently.A regression test is added by tweaking one of the existing queries ofprivileges.sql to stress this case.Reported-by: AndrusAuthor: Michael PaquierReviewed-by: Álvaro HerreraDiscussion:https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.eeBackpatch-through: 9.51 parenta0efda8 commit21378e1
File tree
3 files changed
+7
-2
lines changed- src
- backend/catalog
- test/regress
- expected
- sql
3 files changed
+7
-2
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1365 | 1365 |
| |
1366 | 1366 |
| |
1367 | 1367 |
| |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1368 | 1371 |
| |
1369 | 1372 |
| |
1370 | 1373 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1649 | 1649 |
| |
1650 | 1650 |
| |
1651 | 1651 |
| |
1652 |
| - | |
| 1652 | + | |
| 1653 | + | |
1653 | 1654 |
| |
1654 | 1655 |
| |
1655 | 1656 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
985 | 985 |
| |
986 | 986 |
| |
987 | 987 |
| |
988 |
| - | |
| 988 | + | |
| 989 | + | |
989 | 990 |
| |
990 | 991 |
| |
991 | 992 |
| |
|
0 commit comments
Comments
(0)