>>> On Wed, Nov 29, 2006 at 1:38 PM, in message <21909.1164829090@xxxxxxxxxxxxx>, Tom Lane <tgl@xxxxxxxxxxxxx> wrote: > "Kevin Grittner" <Kevin.Grittner@xxxxxxxxxxxx> writes: >> Richard Huxton <dev@xxxxxxxxxxxx> 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. I know this is naive, but, what is the type information of the bare null? Could that be used?