forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd691cb9
committed
Fix erroneous handling of shared dependencies (ie dependencies on roles)
in CREATE OR REPLACE FUNCTION. The original code would update pg_shdependas if a new function was being created, even if it wasn't, with two badconsequences: pg_shdepend might record the wrong owner for the function,and any dependencies for roles mentioned in the function's ACL would be lost.The fix is very easy: just don't touch pg_shdepend at all when doing afunction replacement.Also update the CREATE FUNCTION reference page, which never explainedexactly what changes and doesn't change in a function replacement.In passing, fix the CREATE VIEW reference page similarly; there's nocode bug there, but the docs didn't say what happens.1 parentcaa4cfa commitd691cb9
File tree
3 files changed
+30
-10
lines changed- doc/src/sgml/ref
- src/backend/catalog
3 files changed
+30
-10
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
565 | 573 |
| |
566 | 574 |
| |
567 | 575 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
152 | 160 |
| |
153 | 161 |
| |
154 | 162 |
| |
|
Lines changed: 12 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| 92 | + | |
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
| |||
290 | 291 |
| |
291 | 292 |
| |
292 | 293 |
| |
293 |
| - | |
| 294 | + | |
294 | 295 |
| |
295 | 296 |
| |
296 | 297 |
| |
| |||
353 | 354 |
| |
354 | 355 |
| |
355 | 356 |
| |
356 |
| - | |
| 357 | + | |
357 | 358 |
| |
358 | 359 |
| |
359 | 360 |
| |
| |||
471 | 472 |
| |
472 | 473 |
| |
473 | 474 |
| |
474 |
| - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
475 | 479 |
| |
476 | 480 |
| |
477 | 481 |
| |
| |||
498 | 502 |
| |
499 | 503 |
| |
500 | 504 |
| |
| 505 | + | |
| 506 | + | |
501 | 507 |
| |
502 | 508 |
| |
503 |
| - | |
504 | 509 |
| |
505 |
| - | |
506 |
| - | |
507 | 510 |
| |
508 | 511 |
| |
509 | 512 |
| |
| |||
537 | 540 |
| |
538 | 541 |
| |
539 | 542 |
| |
540 |
| - | |
| 543 | + | |
| 544 | + | |
541 | 545 |
| |
542 | 546 |
| |
543 | 547 |
| |
|
0 commit comments
Comments
(0)