Re: Implicit coercions need to be reined in

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implicit coercions need to be reined in
Дата
Msg-id 6368.1019055147@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Implicit coercions need to be reined in  (Thomas Lockhart <thomas@fourpalms.org>)
Ответы Re: Implicit coercions need to be reined in  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Thomas Lockhart <thomas@fourpalms.org> writes:
>> It's one thing to say that "apples || oranges" should
>> be interpreted as "apples::text || oranges::text", but it is quite
>> another to say that "apples <= oranges" should be handled that way.

> Hmm. istm that we might need some information to travel with the
> operators, not just the coersion functions themselves. We have a fairly
> type-rich system, but need to preserve the ability to add types and a
> *partial* set of functions and operators and get reasonable behaviors.

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?
        regards, tom lane


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

Предыдущее
От: Lincoln Yeoh
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE