Re: Failure to coerce unknown type to specific type

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Failure to coerce unknown type to specific type
Дата
Msg-id 2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Failure to coerce unknown type to specific type  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: Failure to coerce unknown type to specific type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Kevin Grittner <kgrittn@ymail.com> wrote:

> they both return NULL of type text.

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.  So, if we're going by
the SQL spec, that is what it would take to conform.  It's hardly a
crisis that we don't conform on this point, but it is a fact.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

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