Re: Fallback behavior for "UNKNOWN" types -- proposed change

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fallback behavior for "UNKNOWN" types -- proposed change
Дата
Msg-id 23217.972420761@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fallback behavior for "UNKNOWN" types -- proposed change  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> I propose that we modify the heuristic slightly, so that if there are
> function matches with arguments from different categories, and if one or
> more of the possible matches comes from the "string" category, then that
> category is preferred.

I would suggest a slightly different rule, but maybe it comes out at the
same place in the end: if we can't find a unique match treating UNKNOWN
the way we do now, try again assuming it is TEXT (or at least string
category).  As you say, this is reasonable given that the original
literal looked like a string.

BTW, I have been thinking that numeric literals ought to be initially
assigned a new pseudo-type "UNKNOWNNUMERIC", which would eventually
get coerced to one specific numeric type along the same lines as type
assignment for string literals.  This looks like it might help deal
with the problems of float8 vs. numeric, etc.  Don't have a complete
proposal worked out yet, though.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: looks like we forgot something...
Следующее
От: richard excite
Дата:
Сообщение: Re: Two-phase commit