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.
- [HACKERS] Improving ALTER TYPE support John Jawed
- Re: [HACKERS] Improving ALTER TYPE support Josh Berkus
- Re: [HACKERS] Improving ALTER TYPE support John Jawed
- Re: [HACKERS] Improving ALTER TYPE support Tom Lane
- Re: [HACKERS] Improving ALTER TYPE support John Jawed
- Re: [HACKERS] Improving ALTER TYPE support Tom Lane
- Re: [HACKERS] Improving ALTER TYPE suppo... Josh Berkus
- Re: [HACKERS] Improving ALTER TYPE suppo... John Jawed