#define DEPFLAG_INTERNAL 0x0008 /* reached via internal dependency */
#define DEPFLAG_EXTENSION 0x0010 /* reached via extension dependency */
#define DEPFLAG_REVERSE 0x0020 /* reverse internal/extension link */
+#define DEPFLAG_SUBOBJECT 0x0040 /* subobject of another deletable object */
/* expansible list of ObjectAddresses */
if (extra->flags & DEPFLAG_ORIGINAL)
continue;
+ /* Also ignore sub-objects; we'll report the whole object elsewhere */
+ if (extra->flags & DEPFLAG_SUBOBJECT)
+ continue;
+
objDesc = getObjectDescription(obj);
/*
* DROP COLUMN action even though we know we're gonna delete
* the table later.
*
+ * What we can do, though, is mark this as a subobject so that
+ * we don't report it separately, which is confusing because
+ * it's unpredictable whether it happens or not. But do so
+ * only if flags != 0 (flags == 0 is a read-only probe).
+ *
* Because there could be other subobjects of this object in
* the array, this case means we always have to loop through
* the whole array; we cannot exit early on a match.
*/
ObjectAddressExtra *thisextra = addrs->extras + i;
- thisextra->flags |= flags;
+ if (flags)
+ thisextra->flags |= (flags | DEPFLAG_SUBOBJECT);
}
}
}
* object_address_present_add_flags(), we should propagate
* flags for the whole object to each of its subobjects.
*/
- stackptr->flags |= flags;
+ if (flags)
+ stackptr->flags |= (flags | DEPFLAG_SUBOBJECT);
}
}
}