Hi,
with a moderate PostgreSQL installation we accumulated quite a few stored procedures/functions and types.
Now in the lowest level composite type (i.e. 3 types are built with it and a myriad functions reference any of those types) one element of the type is of wrong type (i.e. smallint instead of bigint), thus handling it is identical, only the range is different.
- How do I know all types depending on a type (pg_catalog.pg_type seems insufficient)?
- How can I know all functions depending on a type (as arguments and locally scoped vars)?
- Can I refactore a composite type (maybe change smallint to bigint) without dropping/rebuilding every single function depending on it?
- Is there any kind of automation/tool/best practice for such a refactoring?
I know its 4 questions in one, but atm this is kind of frustrating and any help would be appreciated! Many Thanks!