Re: Inaccurate description of UNION/CASE/etc type selection

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Inaccurate description of UNION/CASE/etc type selection
Дата
Msg-id CAKFQuwY_TRhxKvnf26L0ZQpYm56Y7__WL7GhR0VGg8AX90HTJw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inaccurate description of UNION/CASE/etc type selection  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Inaccurate description of UNION/CASE/etc type selection  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-docs
On Sun, Aug 16, 2020 at 5:58 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
5. If the first non-unknown type is a preferred type it is chosen, otherwise it is made a candidate, and then,
6. each subsequent type is compared to the current candidate, with a new candidate being chosen only when there exists a non-mutal implicit cast to the new type.
6a. If at any point a preferred type is made a candidate then it will be chosen.

More concisely:

Make the first input type a candidate type.  Each subsequent input type is compared to the current candidate, with a new candidate being chosen only when there exists a non-mutal implicit cast to the new type.  If at any point a preferred type is made a candidate then it will be chosen.

In my original the whole if/otherwise in 5 is pointless given the presence of 6a.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Inaccurate description of UNION/CASE/etc type selection
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Inaccurate description of UNION/CASE/etc type selection