Re: Implicit coercions need to be reined in

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Implicit coercions need to be reined in
Дата
Msg-id 3CBD9027.EEC27E93@fourpalms.org
обсуждение исходный текст
Ответ на Re: Implicit coercions need to be reined in  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
...
> Could we do anything based on looking at the whole set of candidate
> operators?  For example, I think that the reason "apples || oranges"
> is so appealing is that there really is only one way to interpret
> the || operator; whereas of course there are lots of different <=
> operators.  Perhaps we could be more forgiving of implicit coercions
> when there are fewer candidate operators, in some way?  Again, something
> based on type categories would make sense to me.  Perhaps allow
> cross-category implicit coercions only if there are no candidate
> operators accepting the input's native category?

Hmm. That might be a winner. Since everything can be turned into text,
there will always be a fallback to text available. Allow it for
operators which are text-only operators (are there any built in besides
"||"?) and disallow that fallback for the others?

One edge case which we are probably concerned about is the "typeless
literal". I'd guess that we make the right choice in *most* cases
already.

I guess I'm worried that we may be cutting back on the allowed implicit
coersions, when we might really be missing only one or two explicit
coersion functions to fill in the set. I haven't looked at that in a
while...
                  - Thomas


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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Следующее
От: Michael Loftis
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE