"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Still, it rates pretty high on my astonishment scale that a
> COALESCE of two untyped NULLs (or for that matter, any two values of
> unknown type) returns a text value.
What would you have it do instead, throw an error?
The current behavior is a lot less astonishing for this example:COALESCE('a', 'b')
which is the same from the type system's point of view.
regards, tom lane