Skip site navigation (1) Skip section navigation (2)

Re: coalesce with all nulls can only be assigned to

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Richard Huxton" <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: coalesce with all nulls can only be assigned to
Date: 2006-11-29 19:38:10
Message-ID: 21909.1164829090@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

pgsql-general by date

Next:From: Scott MarloweDate: 2006-11-29 19:39:55
Subject: Re: Postgresql data integrity during RAID10 drive rebuild
Previous:From: Kevin GrittnerDate: 2006-11-29 19:32:54
Subject: Re: coalesce with all nulls can only be assigned to

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group