Tom Lane writes:
> IIRC, a function is only considered to be a cast function if it matches
> by name *and schema* with the target type. So if you, for example,
> make a function public.int4(something), it'll never be considered a
> cast function for pg_catalog.int4. I had some doubts about that rule
> when I put it in, but so far have not thought of an alternative I like
> better.
Perhaps it wouldn't be such a terrible idea after all to store the casting
paths separately, such as in a system table pg_cast (from, to, func,
implicit). This would implement the SQL99 spec fairly exactly.
--
Peter Eisentraut peter_e@gmx.net