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

From Tom Lane
Subject Re: Failure to coerce unknown type to specific type
Date
Msg-id 23845.1430681631@sss.pgh.pa.us
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  (Kevin Grittner <kgrittn@ymail.com>)
List 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 by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Failure to coerce unknown type to specific type
Next
From: Kevin Grittner
Date:
Subject: Re: Failure to coerce unknown type to specific type