Re: Failure to coerce unknown type to specific type - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: Failure to coerce unknown type to specific type
Date
Msg-id 2007003193.618271.1430681395388.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Failure to coerce unknown type to specific type  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Failure to coerce unknown type to specific type
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Failure to coerce unknown type to specific type
Next
From: Tom Lane
Date:
Subject: Re: Failure to coerce unknown type to specific type