Re: SQL99, CREATE CAST, and initdb
| От | Tom Lane |
|---|---|
| Тема | Re: SQL99, CREATE CAST, and initdb |
| Дата | |
| Msg-id | 3206.1024966524@sss.pgh.pa.us обсуждение |
| Ответ на | Re: SQL99, CREATE CAST, and initdb (Thomas Lockhart <lockhart@fourpalms.org>) |
| Ответы |
Re: SQL99, CREATE CAST, and initdb
|
| Список | pgsql-hackers |
I said: > Thomas Lockhart <lockhart@fourpalms.org> 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
В списке pgsql-hackers по дате отправления: