I said:
> Thomas Lockhart <[EMAIL PROTECTED]> writes:
>> I've got another issue with casting which I've run into while testing
>> this feature; afaict invoking an explicit CAST() in SQL does not
>> guarantee that the function of the expected name would be called, if
>> that function does not have the implicit flag set.

> [ scratches head ]  Whether the flag is set or not shouldn't matter;
> if the cast function is needed it will be called.  Were you perhaps
> testing binary-compatible cases?

Another possibility is that you got burnt by some schema-related issue;
cf the updated conversion docs at
http://developer.postgresql.org/docs/postgres/typeconv-func.html

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.

                        regards, tom lane



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply via email to