I would even say that DropCastById belongs in the new file, which is
just the attached. However, none of the Drop.*ById or Remove.*ById
functions seem to be in backend/catalog/ at all, and moving just a
single one seems to make things even more inconsistent. I think all
these catalog-accessing functions should be in backend/catalog/ but I'm
not in a hurry to patch half of backend/commands/ to move them all.
(I think the current arrangement is just fallout from having created the
dependency.c system to drop objects, which rid us of a bunch of bespoke
deletion-handling code.)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services