@@ -26,6 +26,9 @@ static const char *modulename = gettext_noop("sorter");
26
26
* Sort priority for database object types.
27
27
* Objects are sorted by type, and within a type by name.
28
28
*
29
+ * Because materialized views can potentially reference system views,
30
+ * DO_REFRESH_MATVIEW should always be the last thing on the list.
31
+ *
29
32
* NOTE: object-type priorities must match the section assignments made in
30
33
* pg_dump.c; that is, PRE_DATA objects must sort before DO_PRE_DATA_BOUNDARY,
31
34
* POST_DATA objects must sort after DO_POST_DATA_BOUNDARY, and DATA objects
@@ -70,11 +73,11 @@ static const int dbObjectTypePriority[] =
70
73
22 , /* DO_PRE_DATA_BOUNDARY */
71
74
26 , /* DO_POST_DATA_BOUNDARY */
72
75
33 , /* DO_EVENT_TRIGGER */
73
- 34 , /* DO_REFRESH_MATVIEW */
74
- 35 , /* DO_POLICY */
75
- 36 , /* DO_PUBLICATION */
76
- 37 , /* DO_PUBLICATION_REL */
77
- 38 /* DO_SUBSCRIPTION */
76
+ 38 , /* DO_REFRESH_MATVIEW */
77
+ 34 , /* DO_POLICY */
78
+ 35 , /* DO_PUBLICATION */
79
+ 36 , /* DO_PUBLICATION_REL */
80
+ 37 /* DO_SUBSCRIPTION */
78
81
};
79
82
80
83
static DumpId preDataBoundId ;
0 commit comments