Re: coalesce with all nulls can only be assigned to - Mailing list pgsql-general

From Tom Lane
Subject Re: coalesce with all nulls can only be assigned to
Date
Msg-id 21909.1164829090@sss.pgh.pa.us
Whole thread Raw
In response to Re: coalesce with all nulls can only be assigned to  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: coalesce with all nulls can only be assigned to
List pgsql-general
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Richard Huxton <dev@archonet.com> wrote:
>> It's the coalesce that has the problem, not the insert. The coalesce is
>> deciding that it's working on text, and so returns text.

> It seems like maybe it would be worth overloading the coalesce method
> to handle this particular case differently.

And do what?  The only information you have is that all the inputs are
of unknown type.  You do not get to look at context, because the type
resolution algorithm has to work bottom-up in expressions.

            regards, tom lane

pgsql-general by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: coalesce with all nulls can only be assigned to
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Development of cross-platform GUI for Open Source DBs