Richard Zetterberg <richard.zetterb...@googlemail.com> writes: > In my head, this change would be instant and postgres would carry on like > nothing happened and that the domain always had the type `text`. Is this a > fools errand? Or could it actually make sense in this situation?
Yeah, I think you can probably get away with this (especially since you've already tested the effects in a throwaway database, IIUC). The main thing people tend to forget when doing this sort of manual catalog surgery is updating pg_depend and/or pg_shdepend. But here there's nothing to do. Since both varchar and text are undroppable built-in types, we don't bother to make dependencies on them. And you're not changing the domain's schema or owner, so its other dependencies don't need to change. regards, tom lane