Re: Failure to coerce unknown type to specific type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Failure to coerce unknown type to specific type
Дата
Msg-id 23845.1430681631@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Failure to coerce unknown type to specific type  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: Failure to coerce unknown type to specific type  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-bugs
Kevin Grittner <kgrittn@ymail.com> writes:
> Section 9.3, which the definition of COALESCE references as the
> way to resolve type conflicts *starts* with this:

> | Let IDTS be the set of data types specified in an application of
> | this Subclause. Let DTS be the set of data types in IDTS
> | excluding any data types that are undefined. If the cardinality
> | of DTS is 0 (zero), then the result data type is undefined and no
> | further Rules of this Subclause are evaluated.

> That's pretty unambiguous that a COALESCE(NULL, NULL) clause should
> yield a NULL with the data type undefined.

This is irrelevant, because such a construct fails the syntax rules
and thus we never get to the question of what type should be inferred,
at least not without going outside the spec.  See my other reply.

            regards, tom lane

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Failure to coerce unknown type to specific type
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Failure to coerce unknown type to specific type