forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit299990b
committed
Repair incorrect pg_dump labeling for some comments and security labels.
We attached no schema label to comments for procedural languages, casts,transforms, operator classes, operator families, or text search objects.The first three categories of objects don't really have schemas, butpg_dump treats them as if they do, and it seems like the TocEntry fieldsfor their comments had better match the TocEntry fields for the parentobjects. (As an example of a possible hazard, the type names in a CASTwill be formatted with the assumption of a particular search_path, sofailing to ensure that this same path is active for the COMMENT ON commandcould lead to an error or to attaching the comment to the wrong cast.)In the last six cases, this was a flat-out error --- possibly mine tobegin with, but it was a long time ago.The security label for a procedural language was likewise not correctlylabeled as to schema, and both the comment and security label for aprocedural language were not correctly labeled as to owner.In simple cases the restore would accidentally work correctly anyway, sincethese comments and security labels would normally get emitted right afterthe owning object, and so the search path and active user would be correctanyhow. But it could fail in corner cases; for example a schema-selectiverestore would omit comments it should include.Giuseppe Broccolo noted the oversight, and proposed the correct fix, fortext search dictionary objects; I found the rest by cross-checking otherdumpComment() calls. These oversights are ancient, so back-patch allthe way.Discussion:https://postgr.es/m/CAFzmHiWwwzLjzwM4x5ki5s_PDMR6NrkipZkjNnO3B0xEpBgJaA@mail.gmail.com1 parentd4c62a6 commit299990b
1 file changed
+10
-10
lines changedLines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10830 | 10830 |
| |
10831 | 10831 |
| |
10832 | 10832 |
| |
10833 |
| - | |
| 10833 | + | |
10834 | 10834 |
| |
10835 | 10835 |
| |
10836 | 10836 |
| |
10837 | 10837 |
| |
10838 |
| - | |
| 10838 | + | |
10839 | 10839 |
| |
10840 | 10840 |
| |
10841 | 10841 |
| |
| |||
11585 | 11585 |
| |
11586 | 11586 |
| |
11587 | 11587 |
| |
11588 |
| - | |
| 11588 | + | |
11589 | 11589 |
| |
11590 | 11590 |
| |
11591 | 11591 |
| |
| |||
11709 | 11709 |
| |
11710 | 11710 |
| |
11711 | 11711 |
| |
11712 |
| - | |
| 11712 | + | |
11713 | 11713 |
| |
11714 | 11714 |
| |
11715 | 11715 |
| |
| |||
12483 | 12483 |
| |
12484 | 12484 |
| |
12485 | 12485 |
| |
12486 |
| - | |
| 12486 | + | |
12487 | 12487 |
| |
12488 | 12488 |
| |
12489 | 12489 |
| |
| |||
12756 | 12756 |
| |
12757 | 12757 |
| |
12758 | 12758 |
| |
12759 |
| - | |
| 12759 | + | |
12760 | 12760 |
| |
12761 | 12761 |
| |
12762 | 12762 |
| |
| |||
13474 | 13474 |
| |
13475 | 13475 |
| |
13476 | 13476 |
| |
13477 |
| - | |
| 13477 | + | |
13478 | 13478 |
| |
13479 | 13479 |
| |
13480 | 13480 |
| |
| |||
13564 | 13564 |
| |
13565 | 13565 |
| |
13566 | 13566 |
| |
13567 |
| - | |
| 13567 | + | |
13568 | 13568 |
| |
13569 | 13569 |
| |
13570 | 13570 |
| |
| |||
13633 | 13633 |
| |
13634 | 13634 |
| |
13635 | 13635 |
| |
13636 |
| - | |
| 13636 | + | |
13637 | 13637 |
| |
13638 | 13638 |
| |
13639 | 13639 |
| |
| |||
13764 | 13764 |
| |
13765 | 13765 |
| |
13766 | 13766 |
| |
13767 |
| - | |
| 13767 | + | |
13768 | 13768 |
| |
13769 | 13769 |
| |
13770 | 13770 |
| |
|
0 commit comments
Comments
(0)