forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit07b3908
committed
Fix pg_dump's handling of dependencies for custom opclasses.
Since pg_dump doesn't treat the member operators and functions of operatorclasses/families (that is, the pg_amop and pg_amproc entries, not theunderlying operators/functions) as separate dumpable objects, it missedtheir dependency information. I think this was safe when the code wasdesigned, because the default object sorting rule emits operators andfunctions before opclasses, and there were no dependency types that couldmess that up. However, the introduction of range types in 9.2 broke it:now a type can have a dependency on an opclass, allowing dependency rulesto push the opclass before the type and hence before custom operators.Lacking any information showing that it shouldn't do so, pg_dump emittedthe objects in the wrong order.Fix by teaching getDependencies() to translate pg_depend entries forpg_amop/amproc rows to look like dependencies for their parent opfamily.I added a regression test for this in HEAD/v12, but not further back;life is too short to fight with 002_pg_dump.pl.Per bug #15934 from Tom Gottfried. Back-patch to all supported branches.Discussion:https://postgr.es/m/15934-58b8c8ab7a09ea15@postgresql.org1 parentf140007 commit07b3908
2 files changed
+62
-2
lines changedLines changed: 33 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17911 | 17911 |
| |
17912 | 17912 |
| |
17913 | 17913 |
| |
| 17914 | + | |
| 17915 | + | |
| 17916 | + | |
| 17917 | + | |
17914 | 17918 |
| |
17915 | 17919 |
| |
17916 | 17920 |
| |
17917 | 17921 |
| |
17918 | 17922 |
| |
17919 | 17923 |
| |
17920 |
| - | |
17921 |
| - | |
| 17924 | + | |
| 17925 | + | |
| 17926 | + | |
| 17927 | + | |
| 17928 | + | |
| 17929 | + | |
| 17930 | + | |
| 17931 | + | |
| 17932 | + | |
| 17933 | + | |
| 17934 | + | |
| 17935 | + | |
| 17936 | + | |
| 17937 | + | |
| 17938 | + | |
| 17939 | + | |
| 17940 | + | |
| 17941 | + | |
| 17942 | + | |
| 17943 | + | |
| 17944 | + | |
| 17945 | + | |
| 17946 | + | |
| 17947 | + | |
| 17948 | + | |
| 17949 | + | |
| 17950 | + | |
| 17951 | + | |
| 17952 | + | |
17922 | 17953 |
| |
17923 | 17954 |
| |
17924 | 17955 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1571 | 1571 |
| |
1572 | 1572 |
| |
1573 | 1573 |
| |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
1574 | 1603 |
| |
1575 | 1604 |
| |
1576 | 1605 |
| |
|
0 commit comments
Comments
(0)