"Walter Cruz" <walter(dot)php(at)gmail(dot)com> writes:
> CREATE CAST (integer AS romano) WITH FUNCTION to_roman(integer);
> What's wrong?
Domains aren't supported as cast source/targets at the moment; I don't
think the system is finding your cast specification at all, but is
instead doing this as 5::text::romano which of course fails. See past
discussions about the subtleties of trying to fix this.
regards, tom lane