I noticed the string "malformed pg_dependencies: "%s"" is used repeatedly throughout the code. Would you consider defining this as a macro? This could reduce duplication and make future updates easier.
It seems to be the way of things. As I stated earlier, what I'd really like is the ability to form different errdetails and have them feed into one errsave(), and still have the strings go through translation.
3.Memory management observation:
Regarding item_attnum_list, while PostgreSQL's memory context mechanism handles cleanup, explicitly freeing the allocated memory after use might improve code clarity.
These are all minor points - the implementation looks solid overall. Thank you for your work on this feature!