I've been working on a function which returns a setof a composite type.
Everytime I've changed the structure of the returning setof, I've had to
change the type accordingly, which current means doing a drop type ...
cascade down to the function. We should allow one of the following:
1) Add a REPLACE on CREATE TYPE (create or replace type)
2) Allow ALTER TYPE to alter the definition of the type (currently it only
allows changes to schema and ownership)
It may get tricky with the first option because there'd be orphaned
dependencies on objects which reference that particular type while it's
being re-created.
I'll work on a patch according to feedback.