Re: TODO: Fix CREATE CAST on DOMAINs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TODO: Fix CREATE CAST on DOMAINs
Дата
Msg-id 18184.1158782933@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TODO: Fix CREATE CAST on DOMAINs  (Mark Dilger <pgsql@markdilger.com>)
Список pgsql-hackers
Mark Dilger <pgsql@markdilger.com> writes:
> If the system chooses cast chains based on a breadth-first search,
> then the existing int2 -> int8 cast would be chosen over an int2 ->
> int4 -> int8 chain, or an int2 -> int3 -> int4 -> int8 chain, or in
> fact any chain at all, because the int2 -> int8 cast is the shortest.

Well, this is the sort of thing that has to be thought about pretty
carefully.  Is "length of chain" the most appropriate metric?  What are
you going to do when resolving a multi-input operator or function, and
there are different ways to match different candidates with different
sets of path lengths?

There's been some prior discussion of attaching a "measure of goodness"
to different potential cast pathways.  I'm too lazy to look it up at the
moment but I strongly suggest whoever wants to produce a concrete
proposal in this area should go check the archives.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Phantom Command ID
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Phantom Command ID